> | restart;with(plots): |
> | a:=-100; b:=100; |
> | affine:=x->(2*x+b+a)/(b-a): |
Warning, the name changecoords has been redefined
> | F:=(p,x)->(2*LegendreP(0,x)/3)-2*sum('LegendreP(k,x)/((2*k-1)*(2*k+3))','k'=1..p); |
> | u:=(p,x)->sqrt((1-x)/2)-F(p,x); |
> | plot([seq(u(i,x),i=1..10)],x=-1..1,y=-0.05..0.05); |
> | f:=x->exp(x);km:=20; |
> | for n from 0 to km do c[n]:=evalf((n+1/2)*int(f(u)*LegendreP(n,u), u=-1..1)); od: |
> |
> | F:=(p,x)->sum('c[k]*LegendreP(k,x)', 'k'=0..p); |
> | plot([seq(exp(x)-F(i,x),i=5..7)],x=-1..1,color=black); |
> | evalf(F(0.1));evalf(exp(0.1)); |
> | plot(F(x), x=-1..1,y=-5..5); |
> |
> |
Maple
TM is a registered trademark of Waterloo Maple Inc.
Math rendered by
WebEQ