Luento 16

23.10.2001 HA

Warning, the name changecoords has been redefined

Esimerkki kompleksisista ominaisarvoista

> restart: with(linalg): with(LinearAlgebra):

Warning, the name changecoords has been redefined

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

Warning, the assigned name GramSchmidt now has a global binding

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

A := _rtable[140186684]

> eigenvectors(A);

[-2+3*I, 1, {vector([1, 1/5-3/5*I])}], [-2-3*I, 1, ...

> om:=Eigenvectors(A);

om := _rtable[140040916], _rtable[140192764]

> lambda:=(om[1])[1];w:=Column(om[2],1);

lambda := -2+3*I

w := _rtable[140040956]

> alpha:=Re(lambda);beta:=Im(lambda);

alpha := -2

beta := 3

> u:=map(Re,w);v:=map(Im,w);

u := _rtable[140040996]

v := _rtable[137526132]

Yleinen ratkaisukaava:

> y:=exp(alpha*t)*((a*cos(beta*t)+b*sin(beta*t))*u+(b*cos(beta*t)-a*sin(beta*t))*v);

y := exp(-2*t)*((a*cos(3*t)+b*sin(3*t))*_rtable[140...

> yy:=evalm(%);

yy := vector([exp(-2*t)*(1/2*a*cos(3*t)+1/2*b*sin(3...

> matrix(2,1,yy): Y:=convert(%,Matrix);

Y := _rtable[140205764]

> A.Y;

_rtable[140207692]

> map(simplify,%);

_rtable[140211900]

> opp:=%:

> vp:=map(diff,Y,t):vp:=map(simplify,%);

vp := _rtable[140213916]

> vp-opp;

_rtable[140219084]

Siis yleinen ratkaisu on oikein.

Alkuehto:

> subs(t=0,Y)=<1,1>;

_rtable[140223092] = _rtable[137242156]

> C:=<<1/2|3/2>,<1|0>>;b:=<1,1>;

C := _rtable[136623648]

b := _rtable[136435488]

> LinearSolve(C,b);

_rtable[140041236]

> y:=subs(a=%[1],b=%[2],y);

y := exp(-2*t)*((cos(3*t)+1/3*sin(3*t))*_rtable[140...

> yy:=evalm(%);

yy := vector([exp(-2*t)*(cos(3*t)-4/3*sin(3*t)), ex...

Tarkistetaan vielä AE (derivointitarkistus jo suoritettiin).

> subs(t=0,op(yy));map(eval,%);

vector([exp(0)*(cos(0)-4/3*sin(0)), exp(0)*(cos(0)+...

vector([1, 1])

> subs(t=0,y);map(eval,%);

exp(0)*((cos(0)+1/3*sin(0))*_rtable[140040996]+(1/3...

_rtable[140041276]

Jälkimmäisessä ei tarvittu op :ia.

Katsotaan dsolvella:

> dys:=diff(y1(t),t)=-y1(t)-5*y2(t),diff(y2(t),t)=2*y1(t)-3*y2(t);

dys := diff(y1(t),t) = -y1(t)-5*y2(t), diff(y2(t),t...

> AE:=y1(0)=1,y2(0)=1;

AE := y1(0) = 1, y2(0) = 1

> ratk:=dsolve({dys,AE},{y1(t),y2(t)});

ratk := {y2(t) = 1/5*exp(-2*t)*(5/3*sin(3*t)+5*cos(...

> Y1:=subs(ratk,y1(t));Y2:=simplify(subs(ratk,y2(t)));

Y1 := exp(-2*t)*(cos(3*t)-4/3*sin(3*t))

Y2 := 1/3*exp(-2*t)*(sin(3*t)+3*cos(3*t))

> op(yy);

vector([exp(-2*t)*(cos(3*t)-4/3*sin(3*t)), exp(-2*t...

Kyllä saatiin samat