Laplace transform not getting Value
Show older comments
I tried to solve lapalce but not getting the value (Xs). Find the code below, Is there any issues in the code?
syms x(t) Xs
eqn = diff(x,t,2)+2*diff(x,t)+26*x(t) == 10*cos(t)*(heaviside(t-pi));
eqnLT = laplace(eqn)
eqnLT = subs(eqnLT,laplace(x(t)), Xs);
eqnLT = subs(eqnLT, {x(0), diff(x(t), t, 0)}, {1/2,1});
Xs = solve(eqnLT, Xs)
Accepted Answer
More Answers (1)
syms x(t) Xs
eqn = diff(x,t,2)+2*diff(x,t)+26*x(t) == 10*cos(t)*(heaviside(t-pi));
eqnLT = laplace(eqn)
eqnLT = subs(eqnLT,laplace(x(t)), Xs);
dx = diff(x,t);
eqnLT = subs(eqnLT, {x(0), dx(0)}, {1/2,1});
Xs = solve(eqnLT, Xs)
1 Comment
Sarthak
on 27 May 2024
%write a matlab code to find the solution of following differential
%equation using Laplace transform method
%d^2y/dx^2-3dy/dx+2y=sinx, y(0)=2, y'(0)=2
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





