Differences between revisions 1 and 2
Revision 1 as of 2010-12-18 07:23:37
Size: 623
Editor: AmitTewari
Comment:
Revision 2 as of 2010-12-18 07:24:09
Size: 616
Editor: AmitTewari
Comment:
Deletions are marked like this. Additions are marked like this.
Line 19: Line 19:
  g(x) = an*cos(n*pi/pi*x) + bn*sin(n*pi/pi*x) + g(x) #h(x) +   g(x) = an*cos(n*pi/pi*x) + bn*sin(n*pi/pi*x) + g(x)
  • Book

    Advanced Engineering Mathematics

    Author

    Erwin Kreyszig

    Edition

    8th Edition

f(x) = x 
f
h(x) = pi
h 
bn = pi
g(x)= a0
for n in range(1,5):
        
        an = integrate(f(x)*cos(n*x)/pi, (x,-pi,pi))
        bn = integrate(f(x)*sin(n*x)/pi, (x,-pi,pi))    
                
        g(x) =  an*cos(n*pi/pi*x) + bn*sin(n*pi/pi*x) + g(x) 
        

print g(x)+ h(x)

  • Solution by:

    • Amit Tewari, Student, IIT Roorkee
    • Rachit Jha, Student, IIT Roorkee
    • Arnab Basu, Student, IIT Roorkee
    • Shubham Mittal, Student, IIT Roorkee

Kreyszig-10.4-2 (last edited 2010-12-18 07:24:09 by AmitTewari)