dsolve function returning empty sum
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Raghuraman S
el 10 de Mzo. de 2019
Comentada: Raghuraman S
el 10 de Mzo. de 2019
Following is the code to solve ode 2nd order ODE d^2y/dt^2+y=0; y(0)=1; y'(0)=0;
I find that the following code works
dsolve('D2y+y=0','y(0)=1','Dy(0)=0')
and it does not work when following code is executed(very equivalent of above code), returns empty sum
syms y(t)
eqn= diff(y,t,2)+ y ==0;
dsolve(eqn,'y(0)=1','Dy(0)=0')
Any idea, sure I did not understand something.
2 comentarios
Respuesta aceptada
Walter Roberson
el 10 de Mzo. de 2019
syms y(t)
dy = diff(y,t);
eqn = diff(y, t, 2) + y == 0;
dsolve(eqn, y(0)==1, dy(0)==0)
Más respuestas (0)
Ver también
Categorías
Más información sobre Equation Solving en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!