Message Boards Message Boards

Why can't DSolve solve this differential equation?

Posted 1 year ago

I need an exact solution to this function instead of a numerical solution.Thanks! enter image description here

POSTED BY: ShengTao Yang
3 Replies

Yes, it is strange.

POSTED BY: Gianluca Gorni
Posted 1 year ago

In documentation center, Dsolve does not require initial conditions when solving differential equations.enter image description here

POSTED BY: ShengTao Yang

It gives a formula if you provide initial conditions:

v[x_] = Piecewise[{{v0, x >= 0}}, 0];
stationarySchroedingerEquation = (-\[HBar]^2/(2 m)) \[Psi]''[x] + 
    v[x] \[Psi][x] == E*\[Psi][x];
sol = DSolveValue[{stationarySchroedingerEquation, \[Psi][
     0] == \[Psi]0, \[Psi]'[0] == \[Psi]1}, \[Psi], x]
Simplify[stationarySchroedingerEquation /. \[Psi] -> sol]
ReImPlot[
 Evaluate[
  sol[x] /. {m -> 1, 
    v0 -> 1, \[Psi]0 -> 2, \[Psi]1 -> -1, \[HBar] -> 1}], {x, -10, 10}]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract