> U1:=U(x,0);
> f:=x->(x<=0,0,x<=Pi/2,x,x<=Pi,Pi-x,o);
ij ( - ), .
> U(x,o)=f(x);
> assume(n::posint);
> f1(x):=x;
> f2(x):=Pi-x;
> A[n]:=2/Pi*{int(f1(x)*sin(n*x),x=0..Pi/2)+ +int(f2(x)*sin(n*x),x=Pi/2..Pi)};
> simplify(%);
> d:=combine(%,tgig);
> sin(1/2*Pi*n):=(-1)^n;
> C[n]:=d;
> U1;
- ,
: ,
,
- , .
, . , U(x,t) , . ³ ( , N ).
> S:=(x,t,N)->sum(2*(2*(-1)^n/n^2)*sin(n*x)/Pi,n=1..N);
animate () (.3.1).
> plots[animate](S(x,t,10),x=0..15,t=0..1, numpoints=100, titlefont=[HELVETICA,BOLD,12]);
3.3 , , . .
, , .
г, , . . u(x,t) t. , . ³ ( ) .
> Eq:=diff(u(x,t),t)=a^2*diff(u(x,t),x$2);
> Eq;
> a:=1;Eq;
.
> U:=(x,t)->Sum(A[n]*(exp((-1)*a^2*(Pi*n/l)^2*t))*sin(Pi*n*x/l),n=1..infinity);
> a:=1;
> U(x,t);
> U1:=U(x,0);
[n] . ³ , .
> f:=x->(x<=0,0,x<=l/2,x,x<=l,l-x,o);
> U(x,o)=f(x);
> assume(n::posint);
> f1(x):=x;
> f2(x):=l-x;
> A1[n]:=2/l*{int(f1(x)*sin(Pi*n*x/l),x=0..l/2)};
> A2[n]:=2/l*{int(f2(x)*sin(Pi*n*x/l),x=l/2..l)};
> sin(1/2*Pi*n):=(-1)^n;
> A1[n];A2[n];
> A[n]:=4*l/(Pi^2*n^2)*sin(Pi*n/2);
> U(x,t);
- , .
|
|
> S:=(x,l,N)->sum(4*sin(Pi*n*x/l)*l*(-1)^n/Pi^2*n^2,n=1..N);
, u(x,t) , .
animate () (.3.2-3.6).
> plots[animate](S(x,l,5),x=0..100,l=1..5,view=-100..100, numpoints=100,titlefont=[HELVETICA,BOLD,12]);
t=0 c.
t=1 c.
t=5 c.
t=10 c.
t=14 c.
3.4 :
>qn:=diff(u(x,y,t),t$2)=a^2*(diff(u(x,y,t),x$2)+ +diff(u(x,y,t), y$2));
> f:=(x,y)->A*x*y*(l-x)*(L-y);
> pdsolve(Eqn,HINT=X(x)*Y(y)*T(t));
> dsolve({diff(X(x),`$`(x,2))=-lambda^2*X(x),X(0)=0},X(x));
> _EnvAllSolutions:=true;
> solve(sin(lambda*l)=0,lambda);
> about(_Z1);
Originally _Z1, renamed _Z1~:
is assumed to be: integer
> nu:=n->Pi*n/l;
> mu:=n->Pi*n/L;
> X:=(x,n)->sin(x*nu(n));
> Y:=(y,m)->sin(y*mu(m));
>dsolve({diff(T(t),`$`(t,2))=a^2*_c[l]*T(t)+ +a^2*_c[2]*T(t),D(T)(0)=0},T(t));
> T:=(t,n,m)->cos(a*t*sqrt(nu(n)^2+mu(m)^2));
>S:=(x,y,t,N,M)->Sum(Sum(U(n,m)*X(x,n)*Y(y,m)*T(t,n,m), n=1..N),m=1..M);
> u:=(x,y,t)->S(x,y,t,infinity,infinity);
> u(x,y,t);
> u(x,y,0);
`
> assume(n::posint,m::posint);
>U:=(n,m)->int(int(f(x,y)*X(x,n)*Y(y,m),y=0..L), x=0..l)/int(int(X(x,n)^2*Y(y,m)^2,y=0..L),x=0..l);
> u(x,y,t);
, , . .
> a:=1;
> l:=1;
> L:=1;
> A:=1;
( 10 100) animate3d plots (.3.7-3.9).
>plots[animate3d](S(x,y,t,10,10),x=0..1,y=0..1,t=0..sqrt(2), axes=FRAME,style=HIDDEN,color=BLACK,orientation=[50,60]);
. t=1 c.
. t=3 c.
. t=4 c.
3.5 : , ,
.
, , . , t . ( , . , , ( ). .
( ) , 䳺 . dchange().
> PDEtools[dchange]({x=rho*cos(phi),y=rho*sin(phi)},
diff(z(sqrt(x^2+y^2)),x$2)+diff(z(sqrt(x^2+y^2)), y$2),{phi,rho});
|
|
.
> simplify(%,symbolic);
.
> Eqn:=diff(u(rho,t),t$2)=a^2*(1/rho)*diff(rho*diff(u(rho, t),rho),rho);
, , .
> f:=t->A*sin(omega*t);
, . .
> pdsolve(Eqn,HINT=F(rho)*f(t));
: , , , , (F(0)<>infinity).
> dsolve({diff(F(rho),`$`(rho,2))=-F(rho)*omega^2*rho+
+a^2*diff(F(rho),rho))/a^2/rho,F(L)=1,F(0)<>infinity}, F(rho));
> F:=unapply(rhs(%),rho);
, , .
> Eqn2:=subs(u(rho,t)=v(rho,t)+F(rho)*f(t),Eqn);
.
> Eqn2:=simplify(Eqn2);
> Eqn2:=lhs(Eqn2)-rhs(Eqn2)=0;
> Eqn2:=simplify(Eqn2);
.
> pdsolve(Eqn,HINT=R(rho)*T(t));
, .
> dsolve({diff(R(rho),`$`(rho,2))=R(rho)*(-lambda^2)-diff(R(rho),rho)/rho,R(0)<>infinity},R(rho));
, . ֳ . .
> solve(BesselJ(0,lambda*L)=0,lambda);
RootOf(BesselJ(0,_ZL))
, L ( ).
Maple BesselJZeros(), , . , . mu()
> mu:=n->BesselJZeros(0,n);
BesselJZeros
.
> R:=(rho,n)->BesselJ(0,rho*mu(n)/L);
BesselJ
, ( f(0)=0).
> solve(u(rho,0)=v(rho,0)+F(rho)*f(0),v(rho,0));
, , T(t), .
> dsolve({diff(T(t),`$`(t,2))=T(t)*a^2*(-lambda^2),T(0)=0}, T(t));
lambda , .
> T:=(t,n)->sin(a*t*mu(n)/L);
v(rho,t) .
> v:=(rho,t)->Sum(B(n)*R(rho,n)*T(t,n),n=1..infinity);
> v(rho,t);
B(n) , v(rho,t).
> F(rho)*D(f)(0);
> Vt0:=-%;
v(rho,t), . , .
> Vt:=proc(rho,t)
> local s;
> diff(v(rho,s),s);
> simplify(subs(s=t,%));
> end proc:
, , , , .
> Vt(rho,t);
> Vt(rho,0);
> eqn:=B(n)*a*BesselJZeros(0,n)=int(Vt0*rho*BesselJ(0,
rho*BesselJZeros(0,n)/L),rho=0..L)/int(rho*BesselJ(0, rho*BesselJZeros(0,n)/L)^2,rho=0..L);
> B:=unapply(solve(eqn,B(n)),n);
> u:=(rho,t)->v(rho,t)+F(rho)*f(t);
, .
|
|
> u(rho,t);
.
> A:=1;
> a:=1;
> omega:=2*Pi;
> L:=1;
, . , B(n) , .
> C:=n->evalf(B(n));
N B(n) C(n).
> U:=(rho,t,N)->sum(C(n)*R(rho,n)*T(t,n),n=1..N)+F(rho)*f(t);
, .
> U(rho,t,3);