legendre3_approximation.mws

[Maple OLE 2.0 Object]

>    restart; with(plots):

Warning, the name changecoords has been redefined

>    f:=(n,x)->LegendreP(n,cos(x));

f := proc (n, x) options operator, arrow; LegendreP(n,cos(x)) end proc

>    g:=(n,x)->sqrt(2/(Pi*n*sin(x)))*sin((n+1/2)*x+Pi/4);

g := proc (n, x) options operator, arrow; sqrt(2/Pi/n/sin(x))*sin((n+1/2)*x+1/4*Pi) end proc

>    h:=f-g;

>    plot(h(20,t),t=0..Pi,y=-0.03..0.03,numpoints=500);

[Maple Plot]

>    p := seq(
        plot(h(i,t),t=0..Pi,
        color=COLOR(HUE, i/50)),
        i=1..50
         ):

>    display([p],insequence=true,view=-0.05..0.05);

[Maple Plot]

>   

Maple TM is a registered trademark of Waterloo Maple Inc.
Math rendered by WebEQ