Second Order Laplace solving doesn’t work (‘Unable to find explicit solution’)
I’m trying to solve an ODE using Laplace method, but I’m stuck on solving the equation
Here’s my code:
syms t x(t) s X(s);
% PARAMETERS (tried to do symbolically but it was more diffcult)
m = 1;
k = 0.5;
xi = 1.2;
c = xi*2*sqrt(k*m)
f0 = 1;
w = 0.1;
dx = diff(x, t, 1);
ddx = diff(x, t, 2);
% INITIAL CONDITIONS
x0 = 0;
dx0 = 0;
newton = m*ddx+ c*dx +k*x;
f = f0*cos(w*t);
lteqn = laplace(newton, t, s)
lefteqn = subs(lteqn,{laplace(x(t), t, s), x(0),dx(0)},{X(s), x0, dx0})
F_s = laplace(f, t, s);
simplify(solve(lefteqn == F_s, X(s)))
I can’t believe MATLAB cannot solve this easy equation. I think I’m missing something.
Thank you guysI’m trying to solve an ODE using Laplace method, but I’m stuck on solving the equation
Here’s my code:
syms t x(t) s X(s);
% PARAMETERS (tried to do symbolically but it was more diffcult)
m = 1;
k = 0.5;
xi = 1.2;
c = xi*2*sqrt(k*m)
f0 = 1;
w = 0.1;
dx = diff(x, t, 1);
ddx = diff(x, t, 2);
% INITIAL CONDITIONS
x0 = 0;
dx0 = 0;
newton = m*ddx+ c*dx +k*x;
f = f0*cos(w*t);
lteqn = laplace(newton, t, s)
lefteqn = subs(lteqn,{laplace(x(t), t, s), x(0),dx(0)},{X(s), x0, dx0})
F_s = laplace(f, t, s);
simplify(solve(lefteqn == F_s, X(s)))
I can’t believe MATLAB cannot solve this easy equation. I think I’m missing something.
Thank you guys I’m trying to solve an ODE using Laplace method, but I’m stuck on solving the equation
Here’s my code:
syms t x(t) s X(s);
% PARAMETERS (tried to do symbolically but it was more diffcult)
m = 1;
k = 0.5;
xi = 1.2;
c = xi*2*sqrt(k*m)
f0 = 1;
w = 0.1;
dx = diff(x, t, 1);
ddx = diff(x, t, 2);
% INITIAL CONDITIONS
x0 = 0;
dx0 = 0;
newton = m*ddx+ c*dx +k*x;
f = f0*cos(w*t);
lteqn = laplace(newton, t, s)
lefteqn = subs(lteqn,{laplace(x(t), t, s), x(0),dx(0)},{X(s), x0, dx0})
F_s = laplace(f, t, s);
simplify(solve(lefteqn == F_s, X(s)))
I can’t believe MATLAB cannot solve this easy equation. I think I’m missing something.
Thank you guys solve, ode, laplace, matlab MATLAB Answers — New Questions