||'''Book'''|| Advanced Engineering Mathematics || ||'''Author'''|| Erwin Kreyszig || ||'''Edition'''|| 8th Edition || /* code_begins */ {{{ g(x) = -x p(x) = x a0 = integrate(g(x)/2 , (x,-2,0)) p0 = integrate(p(x)/2 , (x,0,2)) G(x)=a0 P(x)=p0 for n in range(1,8): an1 = integrate(g(x)*cos(n*x)/2, (x,-2,0)) bn1 = integrate(g(x)*sin(n*x)/2, (x,-2,0)) an2 = integrate(p(x)*cos(n*x)/2, (x,0,2)) bn2 = integrate(p(x)*sin(n*x)/2, (x,0,2)) G(x) = G(x)+an1*cos(n*pi/2*x) + bn1*sin(n*pi/2*x) P(x) = P(x)+an2*cos(n*pi/2*x) + bn2*sin(n*pi/2*x) print G(x)+P(x) }}} /* code_ends */ * '''Solution by''': * SHUBHAM MITTAL, STUDENT, IIT ROORKEE * AMIT TEWARI, STUDENT, IIT ROORKEE * RACHIT JHA, STUDENT, IIT ROORKEE * ARNAB BASU, STUDENT, IIT ROORKEE