Maple Commands for Quiz 6

 
 
The following are Maple commands to generate the coefficients
of the Fourier series solution to problem 1 of quiz 7.

Note: the function f below is even about pi/2. Thus, the even indexed
coefficients, b[n], should be zero, should the sin(nx) 
is odd about pi/2 when n is even.
 
> f:=x^2/Pi -x;

                                         2
                                        x
                                  f := ---- - x
                                        Pi
--------------------------------------------------------------------------------
> i:='i':for i from 1 to 10 do
> (2/Pi)*Int(f*sin(i*x),x=0..Pi)/sinh(2*i);b[i]:=evalf(");
> od;

                               Pi
                               /  /  2     \
                              |   | x      |
                              |   |---- - x| sin(x) dx
                              |   \ Pi     /
                             /
                             0
                           2 -------------------------
                                     Pi sinh(2)

                              b[1] := -.2234906718
                                                  -17
                           b[2] := -.4640597878*10

                             b[3] := -.0001488306059
                                                  -19
                            b[4] := .8077300294*10

                            b[5] := -.5887967528*10

                            b[6] := .1012928597*10
                                                   -8
                            b[7] := -.3930097914*10

                            b[8] := .1508175848*10

                           b[9] := -.3386819368*10

                           b[10] := .3700426818*10
--------------------------------------------------------------------------------
> i:='i':u:=x+Sum(b[i]*sinh(i*y)*sin(i*x),i=1..10);

                             /  10                         \
                             |-----                        |
                             | \                           |
                    u := x + |  )   b[i] sinh(i y) sin(i x)|
                             | /                           |
                             |-----                        |
                             \i = 1                        /
> subs({x=.25,y=.33},u);evalf(");

                          /  10                             \
                          |-----                            |
                          | \                               |
                    .25 + |  )   b[i] sinh(.33 i) sin(.25 i)|
                          | /                               |
                          |-----                            |
                          \i = 1                            /

                                   .2313014166
--------------------------------------------------------------------------------
  
 The following function is the exact solution to problem 2 of quiz 7.
 
--------------------------------------------------------------------------------
> v:=(9*r^2/65 - 9*16*r^(-2)/65)*sin(2*theta);

                            /      2    144 \
                       v := |9/65 r  - -----| sin(2 theta)
                            |              2|
                            \          65 r /
--------------------------------------------------------------------------------
> r1:=sqrt(3+5);

                                r1 := 2sqrt(2)
--------------------------------------------------------------------------------
> theta1:=arctan(sqrt(5)/sqrt(3));

                              theta1 := arctan((1/3)sqrt(5)sqrt(3))
--------------------------------------------------------------------------------
> subs({r=r1,theta=theta1},v);evalf(");

                          54/65 sin(2arctan((1/3)sqrt(5)sqrt(3))

                                   .8043888488
-------------------------------------------------------------------------------