Harj. 6 AV

21.10.01 HA

1.

> 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,5>|<1,-3>>;

A := _rtable[136389332]

> IdentityMatrix(2,2);

_rtable[136950744]

> A:=matrix(2,2,[1,1,5,-3]);

A := matrix([[1, 1], [5, -3]])

> E:=IdentityMatrix(2,2);

E := _rtable[137033400]

> p:=det(A-lambda*E);

p := -8+2*lambda+lambda^2

> lam:=solve(p=0,lambda);

lam := 2, -4

> ALI1:=A-lam[1]*E;ALI2:=A-lam[2]*E;

ALI1 := A+_rtable[137392340]

ALI2 := A+_rtable[137346236]

> eigenvectors(A);

[-4, 1, {vector([1, -5])}], [2, 1, {vector([1, 1])}...

> V:=<<1, -5>|<1, 1>>;

V := _rtable[136929856]

> b:=<0,1>;

b := _rtable[136346824]

> c:=LinearSolve(V,b);

c := _rtable[137379736]

> V.c;

_rtable[137364628]

>

3.

> 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:=<<2,-1>|<10,4>>;

A := _rtable[136360304]

> E:=IdentityMatrix(2,2):

> p:=det(A-lambda*E);

p := lambda^2-6*lambda+18

> lam:=solve(p=0,lambda);

lam := 3+3*I, 3-3*I

> ALI1:=A-lam[1]*E;#ALI2:=A-lam[2]*E;

ALI1 := _rtable[137747532]

> gaussjord(ALI1);

matrix([[1, -1+3*I], [0, 0]])

> w:=<1-3*I,1>;

w := _rtable[137025760]

Tarkistus:

> eigenvectors(A);

[3+3*I, 1, {vector([1-3*I, 1])}], [3-3*I, 1, {vecto...

> lambda:=lam[1]:

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

alpha := 3

beta := 3

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

u := _rtable[137609528]

v := _rtable[137973664]

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

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

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

a*_rtable[137609528]+b*_rtable[137973664]

> V:=<u|v>;

V := _rtable[137666372]

a)

> LinearSolve(V,<1,0>);

_rtable[137225560]

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

ya := exp(3*t)*(-1/3*sin(3*t)*_rtable[137609528]-1/...

b)

> LinearSolve(V,<0,1>);

_rtable[137679040]

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

yb := exp(3*t)*((cos(3*t)+1/3*sin(3*t))*_rtable[137...

> evalm(ya);

vector([exp(3*t)*(-1/3*sin(3*t)+cos(3*t)), -1/3*exp...

> yya:=exp(3*t)*(-1/3*sin(3*t)+cos(3*t)), -1/3*exp(3*t)*sin(3*t);

yya := exp(3*t)*(-1/3*sin(3*t)+cos(3*t)), -1/3*exp(...

> plot([yya,t=-5..1]);

[Maple Plot]

> evalm(yb);

vector([10/3*exp(3*t)*sin(3*t), exp(3*t)*(cos(3*t)+...

> yyb:=10/3*exp(3*t)*sin(3*t), exp(3*t)*(cos(3*t)+1/3*sin(3*t)):

> plot([yyb,t=-5..1]);

[Maple Plot]

>

4.

> 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/50)*<<-4,4>|<1,-4>>;

A := _rtable[137244880]

> eigenvectors(A);

[-3/25, 1, {vector([1, -2])}], [-1/25, 1, {vector([...

> om:=Eigenvectors(A);

om := _rtable[136513404], _rtable[137914652]

> lam:=om[1]:ov:=om[2]:

> y:=C1*exp(lam[1]*t)*Column(ov,1)+C2*exp(lam[2]*t)*Column(ov,2);

y := C1*exp(-3/25*t)*_rtable[137959464]+C2*exp(-1/2...

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

C1*_rtable[137169800]+C2*_rtable[138532076]

> CC:=LinearSolve(ov,<25,0>);

CC := _rtable[136619156]

> Y:=subs(C1=CC[1],C2=CC[2],y);

Y := 25/2*exp(-3/25*t)*_rtable[137959464]+25/2*exp(...

> evalm(Y);

vector([25/2*exp(-3/25*t)+25/2*exp(-1/25*t), -25*ex...

> y1:=25/2*exp(-1/25*t)+25/2*exp(-3/25*t);y2:=25*exp(-1/25*t)-25*exp(-3/25*t);

y1 := 25/2*exp(-3/25*t)+25/2*exp(-1/25*t)

y2 := -25*exp(-3/25*t)+25*exp(-1/25*t)

> plot([y1,y2],t=0..20);

[Maple Plot]

> t0:=solve(y1=y2,t);

t0 := 25/2*ln(3)

> evalf(%);

13.73265361

> plot([y1,y2],t=20..50);

[Maple Plot]

> plot([y1,y2],t=50..100);

[Maple Plot]

>

5.

> 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:=<<8,3>|<-14,-4>>;

A := _rtable[136919392]

> E:=IdentityMatrix(2,2):

> p:=det(A-lambda*E);

p := lambda^2-4*lambda+10

> lam:=solve(p=0,lambda);

lam := 2+I*sqrt(6), 2-I*sqrt(6)

> ALI1:=A-lam[1]*E;

ALI1 := _rtable[137596228]

> gaussjord(ALI1);

matrix([[1, -2-1/3*I*sqrt(6)], [0, 0]])

> om:=Eigenvectors(A);

om := _rtable[136578388], _rtable[138009552]

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

lambda := 2+I*sqrt(6)

w := _rtable[137971480]

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

alpha := 2

beta := sqrt(6)

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

u := _rtable[138041820]

v := _rtable[136620552]

> 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(sqrt(6)*t)+b*sin(sqrt(6)*t))*...

>