I am trying to take the Laplace transform of the following equation using 2019a:
I am having an issue with the integral, which I know should come out to be y(s)/s.
I have tried
I = laplace(int('y(x)','x','0','t'),t,s)y(x) , x,0,t),t,s)
and more basically:
syms y(x) s t x
R = int(y,t,0,t)
laplace(R)
but I keep getting y(s)/s^2
Any help is much appreciated in advance

 Réponse acceptée

Walter Roberson
Walter Roberson le 2 Avr 2020
Modifié(e) : Walter Roberson le 2 Avr 2020

1 vote

syms y(x) s t x
R = int(y,t,0,t)
y is a function of x, which is independent of t, so y(x) is constant as far as integrating with respect to t is concerned.
syms y(u) s t L
assume(s ~= 0);
Dy = diff(y,u)
eqn = Dy(t) + y(t) + int(y,u,0,t) == cos(t)
I = laplace(eqn,t,s)
Is = simplify(I, 'steps',10);
Lt = laplace(y(t),t,s);
ylap = Lt == solve(subs(Is, Lt, L),L)

3 commentaires

Erik Conrath
Erik Conrath le 2 Avr 2020
Thank you! Question, shouldnt the output of taking the Laplace of the integral function be L*(1/s) not just simply L? Or did Matlab switch the physical position of the Laplace transform of y(t) and the Laplace transform of the integral in I?
Erik Conrath
Erik Conrath le 2 Avr 2020
I see it now after extracting just the integral..thanks again.
Daniel Martinez
Daniel Martinez le 29 Mai 2020
How can initial values be added in the code?

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by