solve - unable to find explicit solution

2 views (last 30 days)
Alexei Davydenko
Alexei Davydenko on 4 Feb 2023
Answered: Paul on 4 Feb 2023
Hi, please help me out
Here is my code:
syms s t X(s) x(t) Xs(s);
ode = diff(x, t, 2) + 2*diff(x, t) + x == cosh(2*t);
L = laplace(ode,t,s);
eqn = subs(L,[laplace(x(t), t, s), subs(diff(x(t), t), t, 0), x(0)],[X, 4, 1])
solve(eqn);
xt=ilaplace(Xs);
I can't use fsolve or vpasolve since I need to take the ILT. By hand I can solve the equation, but matlab conks out for some reason. Any ideas on what to do?

Answers (1)

Paul
Paul on 4 Feb 2023
Hi Alexei,
Try to use isolate instead of solve to get an expression for X(s). Also, make sure to take the ilaplace of X(s), not Xs.
If you try and still have a problem, post back with updated code showing where the roadblock is.

Community Treasure Hunt

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

Start Hunting!