Laplace transform of sawtooth function for 2nd order ode

4 ビュー (過去 30 日間)
spcrooks
spcrooks 2018 年 11 月 25 日
コメント済み: Aquatris 2018 年 11 月 26 日
Hi all,
I have taken the rhs laplace for a sawtooth equation where:
f(t)=2t for 0<t<1
and f(t+1)=f(t)
T=2
>> syms s t lapf
lapf =simplify(int('exp(-s*t)*2*t','t=0 .. 2')/(1-exp(-s)))
pretty(lapf)
lapf =
-(2/s^2 - (2*(2*s + 1))/(s^2*exp(2*s)))/(1/exp(s) - 1)
Now I need to solve the differential equation: y'' + y = f(t)
Here, f(t) is the sawtooth function above.
I am having some difficulty marrying the two. Any suggestions would be appreciated.
Thank you!
  5 件のコメント
spcrooks
spcrooks 2018 年 11 月 26 日
I thought about your initial post earlier, and that led me to this...
>> syms s t Y
f = f(t);
F = laplace(f,t,s);
Y1 = Y;
Y2 = Y*s^2;
sol = solve(Y2 + Y1 - F, Y);
However, now I need to figure out how to appropriately insert f(t), which sawtooth function from the OP. I have tried the code with a dummy value for "f" and it works.
Aquatris
Aquatris 2018 年 11 月 26 日
If thats what you want to do, and you are sure about the laplace transform of your sawtooth function, then the answer is easy;
Y = -(2/s^2 - (2*(2*s + 1))/(s^2*exp(2*s)))/(1/exp(s) - 1)/(s^2+1)
You already determined F in your question (the variable lapf), so why are you confused?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by