Solving ODE using laplace
This is the question I’m struggling on
Using the Laplace transform find the solution for the following ODE:
d^2/dt(y(t)) + 16y(t) = 16[1(t-3) -1(t)]
initial conditions:
y(0) = 0
dy(t)/dt = 0
I have to solve the ODE with laplace and with inverse laplace
Save the inverse laplace in y_sol.
This is what I wrote but it gives me the wrong answer:
syms t s y(t) Y X
y0 = 0;
dot_y0 = 0;
dot_y = diff(y,t);
ddot_y = diff(dot_y,t);
ode = ddot_y + 16*y == 16*(1*(t-3)-1*(t))
Y1 = laplace(ode,t,s)
ysol1 = subs(Y1,laplace(y,t,s),X)
ysol2 = subs(ysol1,y(0),y0)
ysol3 = subs(ysol2, subs(diff(y(t), t), t, 0), dot_y0)
ysol = solve(ysol3, X)
Y = simplify(expand(ysol))
y_sol = ilaplace(Y)This is the question I’m struggling on
Using the Laplace transform find the solution for the following ODE:
d^2/dt(y(t)) + 16y(t) = 16[1(t-3) -1(t)]
initial conditions:
y(0) = 0
dy(t)/dt = 0
I have to solve the ODE with laplace and with inverse laplace
Save the inverse laplace in y_sol.
This is what I wrote but it gives me the wrong answer:
syms t s y(t) Y X
y0 = 0;
dot_y0 = 0;
dot_y = diff(y,t);
ddot_y = diff(dot_y,t);
ode = ddot_y + 16*y == 16*(1*(t-3)-1*(t))
Y1 = laplace(ode,t,s)
ysol1 = subs(Y1,laplace(y,t,s),X)
ysol2 = subs(ysol1,y(0),y0)
ysol3 = subs(ysol2, subs(diff(y(t), t), t, 0), dot_y0)
ysol = solve(ysol3, X)
Y = simplify(expand(ysol))
y_sol = ilaplace(Y) This is the question I’m struggling on
Using the Laplace transform find the solution for the following ODE:
d^2/dt(y(t)) + 16y(t) = 16[1(t-3) -1(t)]
initial conditions:
y(0) = 0
dy(t)/dt = 0
I have to solve the ODE with laplace and with inverse laplace
Save the inverse laplace in y_sol.
This is what I wrote but it gives me the wrong answer:
syms t s y(t) Y X
y0 = 0;
dot_y0 = 0;
dot_y = diff(y,t);
ddot_y = diff(dot_y,t);
ode = ddot_y + 16*y == 16*(1*(t-3)-1*(t))
Y1 = laplace(ode,t,s)
ysol1 = subs(Y1,laplace(y,t,s),X)
ysol2 = subs(ysol1,y(0),y0)
ysol3 = subs(ysol2, subs(diff(y(t), t), t, 0), dot_y0)
ysol = solve(ysol3, X)
Y = simplify(expand(ysol))
y_sol = ilaplace(Y) ode MATLAB Answers — New Questions