# Second order differential equation solution

Ron Burgundypants
Homework Statement:
Looking at Griffiths quantum mechanics chapter 2.1 and 2.5, how do we get to the solution to the second order differential equation?
Relevant Equations:
(1) d^2Psi/dx^2 = -k^2 Psi
(2) Psi(x) = Asin(kx) + Bcos(kx) || Ae^-kx + Be^kx
(3) (1/Psi) d^2 Psi = -k^2 Psi dx^2
(4) ln(Psi) d Psi = -x k^2 Psi dx + c
I know the solution to the equation (1) below can be written in terms of exponential functions or sin and cos as in (2). But I can't remember exactly how to get there using separation of variables. If I separate the quotient on the left and bring a Psi across, aka separation of variables (as I was taught by physicists), and then integrate once I get (4), but then I'm still left with an operator I need to get rid of. I can of course then exponentiate away the log but then if i integrate again I'm going to get a right mess. So any ideas what to do?

Homework Helper
Gold Member
2022 Award
Homework Statement:: Looking at Griffiths quantum mechanics chapter 2.1 and 2.5, how do we get to the solution to the second order differential equation?
Relevant Equations:: (1) d^2Psi/dx^2 = -k^2 Psi
(2) Psi(x) = Asin(kx) + Bcos(kx) || Ae^-kx + Be^kx
(3) (1/Psi) d^2 Psi = -k^2 Psi dx^2
(4) ln(Psi) d Psi = -x k^2 Psi dx + c

I know the solution to the equation (1) below can be written in terms of exponential functions or sin and cos as in (2). But I can't remember exactly how to get there using separation of variables. If I separate the quotient on the left and bring a Psi across, aka separation of variables (as I was taught by physicists), and then integrate once I get (4), but then I'm still left with an operator I need to get rid of. I can of course then exponentiate away the log but then if i integrate again I'm going to get a right mess. So any ideas what to do?
##y"+k^2y=0##
##y'y"+k^2y'y=0##
Integrate, then trig substitution.

Ron Burgundypants
I don't understand what you've written or how you get there.

Homework Helper
Gold Member
Separation of variables is limited to 1st order ODE's (can be non-linear).

You can reduce a 2nd order ODE to two 1st order ones but only if the zero order derivative coefficient is zero. So you can solve y''(x) + y'(x) = A but not y'' + y = A by separation if separation is possible for both 1st order ODE's. There may be other methods I don't know about.

Perhaps haruspex accomplishes this his way but I don't offhand see it either.

This being a linear ODE the best way is Laplace transformation typically encountered in engineering curricula only. All boundary or initial conditions automatically included and very extensive inverse tables readily available. Only way to fly!

Homework Helper
Gold Member
2022 Award
I don't understand what you've written or how you get there.
Sorry, for some reason I got no alert that you had replied.
You have an equation of the form ##y''+k^2y=0##.
Multiplying both sides by y' gives ##y''y'+k^2yy'=0##.
Both terms are directly integrable:
##\frac 12y'^2+\frac 12k^2y^2=C^2/2##.
##y'=\sqrt{C^2-k^2y^2}##
This suggests a trig substitution, ##y=\frac Ck\sin(\theta)##:
##\frac 1k\cos(\theta)\theta'=\cos(\theta)##
##\theta'=k##.

Homework Helper
Homework Statement:: Looking at Griffiths quantum mechanics chapter 2.1 and 2.5, how do we get to the solution to the second order differential equation?
Relevant Equations:: (1) d^2Psi/dx^2 = -k^2 Psi
(2) Psi(x) = Asin(kx) + Bcos(kx) || Ae^-kx + Be^kx
I know the solution to the equation (1) below can be written in terms of exponential functions or sin and cos as in (2). But I can't remember exactly how to get there using separation of variables.
The differential equation is a second order, linear,homogeneous one, with constant coefficients.. The usual way of solution is trying the function f(x)=exp(kx) . Substitute into the differential equation, you get the "characteristic equation" for k, a quadratic one. Usually, you get two different roots, either both real, or both complex, imaginary in this case, . The general solution of the ode is linear combination of the two exponential functions, exp(k1x) and exp(k2x), or linear combination of a sine and a cosine function: Asin(kx)+Bcos(kx).

Homework Helper
Gold Member
Sorry, for some reason I got no alert that you had replied.
You have an equation of the form ##y''+k^2y=0##.
Multiplying both sides by y' gives ##y''y'+k^2yy'=0##.
Both terms are directly integrable:
##\frac 12y'^2+\frac 12k^2y^2=C^2/2##.
##y'=\sqrt{C^2-k^2y^2}##
This suggests a trig substitution, ##y=\frac Ck\sin(\theta)##:
##\frac 1k\cos(\theta)\theta'=\cos(\theta)##
##\theta'=k##.
Or, easily separable:
$$\frac {dy} {(c^2 - k^2y^2)^{1/2}} = dx$$ etc.

EDIT: Forget this. We need ## \psi(x) ##, not ## x(\psi) ##.

Last edited: