How to solve laplace transform for ODE with initial value condition
24 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
i have tried to solve this problem

with this code :
syms t y(t) Y(s) Dy0 a b y0
Dy1 = diff(y,t,1);
eqn = laplace(t*Dy1+ y == cos(t))
eqn = subs(eqn, {laplace(y(t), t, s), subs(diff(y(t), t), t, 0), y(0)},{Y(s), 0, 2})
eqn = isolate(eqn, Y)
but it did not work, i may used the code in improperr way but i am pretty sure that the prob. has an answer not as matlap programm responde that the equation has no solution..
any help i will apretiate
0 Commenti
Risposte (1)
Sulaymon Eshkabilov
il 15 Nov 2021
Here is the corrected code:
syms t s y(t) Y(s)
Dy = diff(y,t);
EQN = t*Dy+y== cos(t);
LT = laplace(EQN, t, s);
LT = subs(LT, {laplace(y(t), t, s), y(0)},{Y(0), 2})
Y = solve(LT, Y)
disp('Solution is: ')
SOL = ilaplace(Y)
pretty(SOL)
% It does not have an analytical solution:
syms t y(t)
Dy = diff(y,t);
EQN = t*Dy+y== cos(t);
SOL = dsolve(EQN, y(0)==2)
0 Commenti
Vedere anche
Categorie
Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
