Laplaceyhtälö muuttujat erotellen 

KP3-II 9.12.2008 

Alustukset 

> restart:
 

> with(plots): setoptions3d(orientation=[-120,50],axes=box):
 

> #read("e:ns05.mpl");
 

Esim Viimeinen luentoesimerkki 

 

> f:=x->100: a:=24;
 

24 (2.1)
 

> summaf:=(x,y,N)->400/Pi*add(1/((2*k-1)*sinh((2*k-1)*Pi))*sin((2*k-1)*Pi*x/a)*sinh((2*k-1)*Pi*y/a),k=1..N);
 

proc (x, y, N) options operator, arrow; `+`(`/`(`*`(400, `*`(add(`/`(`*`(sin(`/`(`*`(`+`(`*`(2, `*`(k)), `-`(1)), `*`(Pi, `*`(x))), `*`(a))), `*`(sinh(`/`(`*`(`+`(`*`(2, `*`(k)), `-`(1)), `*`(Pi, `*`(... (2.2)
 

>
 

> summaf(.1,.2,3); evalf(%);
 

 

`+`(`/`(`*`(400, `*`(`+`(`/`(`*`(sin(`+`(`*`(0.4166666667e-2, `*`(Pi)))), `*`(sinh(`+`(`*`(0.8333333333e-2, `*`(Pi)))))), `*`(sinh(Pi))), `/`(`*`(`/`(1, 3), `*`(sin(`+`(`*`(0.1250000000e-1, `*`(Pi))))...
`+`(`/`(`*`(400, `*`(`+`(`/`(`*`(sin(`+`(`*`(0.4166666667e-2, `*`(Pi)))), `*`(sinh(`+`(`*`(0.8333333333e-2, `*`(Pi)))))), `*`(sinh(Pi))), `/`(`*`(`/`(1, 3), `*`(sin(`+`(`*`(0.1250000000e-1, `*`(Pi))))...
`+`(`/`(`*`(400, `*`(`+`(`/`(`*`(sin(`+`(`*`(0.4166666667e-2, `*`(Pi)))), `*`(sinh(`+`(`*`(0.8333333333e-2, `*`(Pi)))))), `*`(sinh(Pi))), `/`(`*`(`/`(1, 3), `*`(sin(`+`(`*`(0.1250000000e-1, `*`(Pi))))...
0.3799714286e-2 (2.3)
 

> plot3d(summaf(x,y,10),x=0..a,y=0..a,axes=box);
 

Plot
 

 

 

 

> plot([seq(summaf(x,y,10),y=[seq(i,i=0..a)])],x=0..a);
 

Plot_2d
 

>