Harj. 8 LV

pe 9.11.01 HA

1.

> restart: with(inttrans): alias(L=laplace,IL=invlaplace,u=Heaviside):
%plots[setoptions](axes=boxed):

Warning, the name changecoords has been redefined

> dy:=diff(x(t),t,t)+2*diff(x(t),t)+x(t)=Dirac(t)-u(t-2*Pi);

dy := diff(x(t),`$`(t,2))+2*diff(x(t),t)+x(t) = Dir...

> AE:=x(0)=0,D(x)(0)=0;

AE := x(0) = 0, D(x)(0) = 0

> Ldy:=L(dy,t,s);Ldy:=subs(AE,Ldy);

Ldy := s*(s*L(x(t),t,s)-x(0))-D(x)(0)+2*s*L(x(t),t,...

Ldy := s^2*L(x(t),t,s)+2*s*L(x(t),t,s)+L(x(t),t,s) ...

> X:=solve(Ldy,L(x(t),t,s));

X := -(-s+exp(-2*s*Pi))/(s*(s^2+2*s+1))

> nim:=denom(X):X1:=factor(s/nim);X2:=-1/factor(nim);

X1 := 1/((s+1)^2)

X2 := -1/(s*(s+1)^2)

> x:=IL(X,s,t);

x := t*exp(-t)-u(t-2*Pi)+u(t-2*Pi)*exp(-t+2*Pi)*t-2...

> plot(x,t=0..20);

[Maple Plot]

2.

> restart: with(inttrans): alias(L=laplace,IL=invlaplace,u=Heaviside):

Warning, the name changecoords has been redefined

> Fa:=1/(s-a)^2;IL(Fa,s,t);

Fa := 1/((s-a)^2)

t*exp(a*t)

> Fb:=1/((s^2)*(s^2+omega^2));IL(Fb,s,t): simplify(%);

Fb := 1/(s^2*(s^2+omega^2))

(omega*t-sin(omega*t))/(omega^3)

> convert(Fb,parfrac,s);

1/(omega^2*s^2)-1/(omega^2*(s^2+omega^2))

> Fc:=s/((s^2+omega^2)^2);IL(Fc,s,t): simplify(%);

Fc := s/((s^2+omega^2)^2)

1/2*t*sin(omega*t)/omega

3.

4.

> restart:alias(L=laplace, IL=invlaplace, u=Heaviside):
with(linalg):with(LinearAlgebra):with(inttrans):
A:=<<3 ,4>|<-2,1>>;
I2:=<<1,0>|<0,1>>;
A2:=Matrix(inverse(s*I2-A));
e:=map(IL,A2,s,t);
exponential(A,t);
g:=<<sin(t),-cos(t)>>;
G:=map(L,g,t,s);
X:=A2.G;
xt:=map(IL,X,s,t);

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

Warning, the name hilbert has been redefined

A := _rtable[137010728]

I2 := _rtable[136427704]

A2 := _rtable[136551632]

e := _rtable[137208052]

matrix([[1/7*exp(2*t)*sqrt(7)*sin(sqrt(7)*t)+exp(2*...

g := _rtable[138410880]

G := _rtable[138399048]

X := _rtable[138261044]

xt := _rtable[136868048]

5.

> restart: with(inttrans): alias(L=laplace,IL=invlaplace,u=Heaviside):
plots[setoptions](axes=boxed):

Warning, the name changecoords has been redefined

Määritellään mieluummin symmetrisesti samalla tavoin kuin prujussa.

> delta[epsilon](t-a);

delta[epsilon](t-a)

Tässä a=1, käytetään notaatiota (ja määritelmää)

> d1:=(1/epsilon)*(u(t-1+epsilon/2)-u(t-1-epsilon/2));plot(subs(epsilon=0.2,d1),t=0..2);
Ld1:=1/(2*epsilon*s)*(exp(-s)*exp(epsilon*s/2)-exp(-epsilon*s/2));

d1 := (u(t-1+1/2*epsilon)-u(t-1-1/2*epsilon))/epsil...

[Maple Plot]

Ld1 := 1/2*(exp(-s)*exp(1/2*epsilon*s)-exp(-1/2*eps...

> F:=1/(s*(s+1)*(s+2));

F := 1/(s*(s+1)*(s+2))

> f:=unapply(IL(F,s,t),t);

f := proc (t) options operator, arrow; 1/2-exp(-t)+...

> y:=1/epsilon*(f(t-1+epsilon/2)*u(t-1+epsilon/2)-f(t-(1+epsilon/2))*u(t-(1+epsilon/2)));

y := ((1/2-exp(-t+1-1/2*epsilon)+1/2*exp(-2*t+2-eps...

> y1:=subs(epsilon=1,y):y05:=subs(epsilon=0.5,y):y02:=subs(epsilon=0.2,y):y01:=subs(epsilon=0.1,y):y005:=subs(epsilon=0.05,y):

> dy:=diff(x(t),t,t)+3*diff(x(t),t)+2*x(t)=Dirac(t-1);
AE:=x(0)=0,D(x)(0)=0;

dy := diff(x(t),`$`(t,2))+3*diff(x(t),t)+2*x(t) = D...

AE := x(0) = 0, D(x)(0) = 0

> Ldy:=L(dy,t,s);Ldy:=subs(AE,Ldy);

Ldy := s*(s*L(x(t),t,s)-x(0))-D(x)(0)+3*s*L(x(t),t,...

Ldy := s^2*L(x(t),t,s)+3*s*L(x(t),t,s)+2*L(x(t),t,s...

>

> X:=solve(Ldy,L(x(t),t,s));
x:=IL(X,s,t);

X := exp(-s)/(s^2+3*s+2)

x := -u(t-1)*exp(-2*t+2)+u(t-1)*exp(-t+1)

> plot(x,t=0..20);

[Maple Plot]

> plot([y1,y05,y02,y01,y005,x],t=0..4,color=[red,blue,black,green,cyan,gold]);

[Maple Plot]

> plot([y1,x],t=0..4,color=[blue,gold]);

[Maple Plot]

> plot([y02,x],t=0..4,color=[black,gold]);

[Maple Plot]

>