Differentiaaliyhtälöitä Laplace-muunnoksin
30.9.2005 HA
Alustukset
> | restart: |
> | with(inttrans): alias(L=laplace,IL=invlaplace,u=Heaviside): |
> |
Esim. 1
> | restart: |
> | with(inttrans): alias(L=laplace,IL=invlaplace,u=Heaviside): |
> | diffyht:=diff(y(t),t,t)-y(t)=t; |
> | Ldy:=L(diffyht,t,s); # Maplen laplace osaa derivaattasäännön. |
> | Ldy:=subs(y(0)=1,D(y)(0)=1,Ldy); |
> | Y:=solve(Ldy,L(y(t),t,s)); |
> | Y:=convert(Y,parfrac,s); |
> | y:=IL(Y,s,t); |
> | plot([t,y],t=0..3,color=[red,blue],title="Punainen heräte, sininen vaste"); |
Näin toimii vaimentamaton systeemi.
Esim. 2
> | restart: |
> | with(inttrans): alias(L=laplace,IL=invlaplace,u=Heaviside): |
> | diffyht:=diff(y(t),t,t)+2*diff(y(t),t)+y(t)=exp(-t); |
> | Ldy:=L(diffyht,t,s); # Maplen laplace osaa derivaattasäännön. |
> | Ldy:=subs(y(0)=-1,D(y)(0)=1,Ldy); #Alkuehdot |
> | Y:=solve(Ldy,L(y(t),t,s)); factor(%); |
> | Y:=convert(Y,parfrac,s); |
> | y:=IL(Y,s,t); |
> | plot([exp(-t),y],t=0..3,color=[red,blue],title="Punainen heräte, sininen vaste"); |
> | plot([exp(-t),y],t=3..8,color=[red,blue],title="Punainen heräte, sininen vaste"); |
> |
> |
> |