Laplace transform not found.

I am trying to compute the Laplace transform of a known function. I have replicated the code shown below in Mathematica and it works fine, but I am unsure as to why it is not working in Matlab. The result I get is just laplace (some expression).
clearvars
close all
syms G w0 wc wk tau s C
a(tau) = int(wk^3*exp(-1i*(wk-w0)*tau), wk, 0, wc);
corr(tau) = (G/(w0^3))*(a(tau));
F(s) = laplace(corr(tau),tau,s);
C(s) = solve(s*C-1==-F(tau)*C,C);

2 个评论

How are you doing the transform in Mathematica? Wolfram Alpha says it is invalid.
https://www.wolframalpha.com/input/?i=laplace+transform&assumption=%7B%22F%22%2C+%22LaplaceTransformCalculator%22%2C+%22transformfunction%22%7D+-%3E%22%28G*%28%286*exp%28tau*w0*sqrt%28-1%29%29%29%2Ftau%5E4+%2B+%28exp%28tau*w0*sqrt%28-1%29%29*exp%28-tau*wc*sqrt%28-1%29%29*%28tau%5E3*wc%5E3*sqrt%28-1%29+%2B+3*tau%5E2*wc%5E2+-+tau*wc*6*sqrt%28-1%29+-+6%29%29%2Ftau%5E4%29%29%2Fw0%5E3%22&assumption=%7B%22F%22%2C+%22LaplaceTransformCalculator%22%2C+%22variable1%22%7D+-%3E%22tau%22&assumption=%7B%22C%22%2C+%22laplace+transform%22%7D+-%3E+%7B%22Calculator%22%7D&assumption=%7B%22F%22%2C+%22LaplaceTransformCalculator%22%2C+%22variable2%22%7D+-%3E%22s%22
Hi, thank you for your answer! I am not sure how that online solver works, but this works just fine in Mathematica! I have attatched and image of the code as it gets real messy whe trying to write it here.

请先登录,再进行评论。

回答(1 个)

The wk^3*exp(x*tau) is getting integrated to include a /tau^4 term -- the general pattern wk^n*exp(...*tau) integrates to something that divides by tau^(n+1)
And that is leading to a problem with the laplace. You do not have compensating tau^4 in your numerator, and
syms t s
laplace(1/t, t, s)
which is to say that the laplace transform of division by the variable being transformed is not being processed. That is because the transform does not exist.

1 个评论

I don't understand. If the Laplace tranform does not exist why is Mathematica solving it without problems?

请先登录,再进行评论。

类别

帮助中心File Exchange 中查找有关 MATLAB 的更多信息

产品

版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by