second order differential Equation
이전 댓글 표시
Hello everyone
i have been trying to solve laplace transforms for second order differential equation: y''(t) - 6 * y'(t) + 9 * y(t) = 3 * sinh(t), y(0)=1, y'(0)=1 by Matlab to check with my hard calculation's answer which is y(t) = ((3/8) * e^t) - ((3/32) * e^-t) + ((23/32) * e^3t) - ((13/8) * t * e^3t). However it gave a warming in line 121 and i didnt really understand how to fix it properly. If anyone has idea, please let me know.
Thank you

답변 (1개)
Star Strider
2020년 10월 7일
The symbolic Math Toolbox no longer uses strings. That threq the warning.
For the rest:
% % y''(t) - 6 * y'(t) + 9 * y(t) = 3 * sinh(t), y(0)=1
syms s t y(t) Y(s) Dy0
eqn = diff(y,2) -6*diff(y) + 9*y == 3*sinh(t); % Time-Domain Equation
Eqn = laplace(eqn) % ‘s’-Domain Equation
Eqn = subs(Eqn,{laplace(y(t), t, s), y(0), subs(diff(y(t), t), t, 0)}, {Y(s), 1, Dy0}) % Substitute To Create Readable Expression
Eqn = simplify(Eqn, 'Steps', 250) % Simplify
Ys = isolate(Eqn, Y) % ‘Solve’ For ‘Y(s)’
produces:
Ys =
Y(s) == -(Dy0 + s - Dy0*s^2 + 6*s^2 - s^3 - 9)/(s^4 - 6*s^3 + 8*s^2 + 6*s - 9)
that in LaTeX is:

.
카테고리
도움말 센터 및 File Exchange에서 Mathematics에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!