0
$\begingroup$

Solve the differential equation $\frac{d^2y}{dt^2}-\cos t \cdot \frac{dy}{dt}+e^t.y=0$

I have attempted with DSolve[{y''[x] - Cos[x]*y'[x] + y[x]*E^x == 0, y[0] == 0, y'[0] == 0}, y[x], x] which gives DSolve[{E^x y[x] - Cos[x] Derivative[1][y][x] + (y^\[Prime]\[Prime])[x] == 0, True, True}, y[x], x]

What is going wrong here and how do I find the solution ?

$\endgroup$
3
  • 1
    $\begingroup$ y[0],y'[0]are predefined, restart your kernel!. Now Mathematica evaluation shows the input (after a while) and shows that MMA can't solve the ode! $\endgroup$ Commented Nov 8, 2020 at 21:25
  • 2
    $\begingroup$ The solution is the trivial solution y[x] = 0 (by inspection). DSolve won't find it because it can't find the general solution, and it doesn't seem to be able to solve by inspection. $\endgroup$
    – Michael E2
    Commented Nov 8, 2020 at 22:24
  • 1
    $\begingroup$ You can still use NDSolve to get a numerical solution. $\endgroup$ Commented Nov 9, 2020 at 8:21

1 Answer 1

1
$\begingroup$

This return y[x]=0

Plot[NDSolveValue[{y[0] == 0, y'[0] == 0, y''[t] - Cos[t] y'[t] + E^t y[t] == 0}, y, {t, 0, 
10}][x], {x, 0, 10}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.