MATLAB Answers

Laplace transform not found.

23 views (last 30 days)
Jose Aroca
Jose Aroca on 3 Dec 2020
Commented: Jose Aroca on 3 Dec 2020
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 Comments

Walter Roberson
Walter Roberson on 3 Dec 2020
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
Jose Aroca
Jose Aroca on 3 Dec 2020
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.

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 3 Dec 2020
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 Comment

Jose Aroca
Jose Aroca on 3 Dec 2020
I don't understand. If the Laplace tranform does not exist why is Mathematica solving it without problems?

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by