L13maple, e^(A*t)

Alustukset

>    restart:

Warning, the name changecoords has been redefined

>    with(LinearAlgebra):with(linalg):

Warning, the previous binding of the name GramSchmidt has been removed and it now has an assigned value

Warning, the protected names norm and trace have been redefined and unprotected

>    alias(GS=LinearAlgebra[GramSchmidt]):

Esim. EHY-ratk.

Luentotehtävä

>    A:=<<2,1>|<-4,-3>>;

A := Matrix(%id = 135751496)

>    g:=t-><2*t^2+10*t,t^2+9*t+3>;

g := proc (t) options operator, arrow; `<,>`(2*t^2+10*t,t^2+9*t+3) end proc

>    (lambda,ov):=Eigenvectors(A);

lambda, ov := Vector(%id = 134823080), Matrix(%id = 138319952)

>    v1:=ov[1..-1,1]: v2:=ov[1..-1,2]:

>    yh:=C1*exp(lambda[1]*t)*v1+C2*exp(lambda[2]*t)*v2;

>   

yh := C1*exp(-2*t)*Vector(%id = 134835136)+C2*exp(t)*Vector(%id = 134852424)

>   

LinearAlgebra on keskeneräinen. Yllä oleva täytyy tarjoilla komponentti kerrallaan:

>    Y:=t-><<exp(lambda[1]*t)*v1[1],exp(lambda[1]*t)*v1[2]>|<exp(lambda[2]*t)*v2[1],exp(lambda[2]*t)*v2[2]>>;

Y := proc (t) options operator, arrow; `<|>`(`<,>`(exp(lambda[1]*t)*v1[1],exp(lambda[1]*t)*v1[2]),`<,>`(exp(lambda[2]*t)*v2[1],exp(lambda[2]*t)*v2[2])) end proc

>    Y(t);

Matrix(%id = 138328188)

Tässä on nyt perusmatriisi . Sen avulla sa

adaan e^(A*t)  .

>    expA:=t->Y(t).(Y(0)^(-1));

expA := proc (t) options operator, arrow; Y(t).(1/Y(0)) end proc

>    expA(t);

Matrix(%id = 135268980)

>    exponential(A,t);

matrix([[-1/3*exp(-2*t)+4/3*exp(t), 4/3*exp(-2*t)-4/3*exp(t)], [-1/3*exp(-2*t)+1/3*exp(t), 4/3*exp(-2*t)-1/3*exp(t)]])

Oikein meni.

Sitten se kaunis EHY-kaava :

>    y(t)=e^('A'*t)*C+Int(e^'A(t-s)'*'g(s)',s=0..t); #tekstinkäsittelyä

y(t) = e^(A*t)*C+Int(e^A(t-s)*g(s),s = 0 .. t)

>    yp:=map(int,expA(t-s).g(s),s=0..t);

yp := Vector(%id = 134677972)

Saatiin kuin saatiinkin sama tulos kuin eilen lasketulla yritteellä (vrt. KRE 3.6 s. 184)

>    yh:=expA(t).<C1,C2>;yh:=map(collect,%,{exp(-2*t),exp(t)});

yh := Vector(%id = 134583788)

yh := Vector(%id = 134584848)

>    y:=yh+yp;

y := Vector(%id = 134763108)

>   

>   

Saadaan yksinkertaisempaan muotoon, tee käsin!