# Solving 2nd order ODE in order to get equation for Orbital Trajectory

## Homework Statement:

Solve a differential equation to obtain trajectory

## Relevant Equations:

Solve ##\frac{du^2}{d\theta ^2}+u=\frac{GM}{h^2}## for ##u##
I want to solve ##\frac{du^2}{d\theta ^2}+u=\frac{GM}{h^2}## for ##u(\theta)##, where ##\frac{GM}{h^2}=constant##.

The given equation is a nonhomogeneous second order linear DE. I begin by solving the associated homogeneous DE with constant coefficients:

##\frac{du^2}{d\theta ^2}+u=0##​

which has general solution ##u_c=A cos\theta + B sin\theta##.

Now, I use variation of parameters to obtain the general solution to the nonhomogeneous equation. The form of the particular solution is ##u_p=u_1y_1+u_2y_2## where:

##u'_1=\frac{W_1}{W}##

##u'_2=\frac{W_2}{W}##

##W=y_1y'_2-y'_1y_2=cos^2\theta+sin^2\theta##

##W_1=-\frac{GM}{h^2} sin\theta##

##W_2=\frac{GM}{h^2} cos\theta##​

So that

##u_1 = -\frac{GM}{h^2}\int sin\theta d\theta = \frac{GM}{h^2} cos\theta +C_1##

##u_1 = \frac{GM}{h^2}\int cos\theta d\theta = \frac{GM}{h^2} sin\theta +C_2##​

The particular solution is then

##u_p=(\frac{GM}{h^2} cos\theta +C_1)*cos\theta+(\frac{GM}{h^2} sin\theta +C_2)*sin\theta##

##u_p=\frac{GM}{h^2}+C_1cos\theta+C_2sin\theta##​

Combining ##u_c## and ##u_p## to obtain the general solution yields

##u=\frac{GM}{h^2}+C_1cos\theta+C_2sin\theta+A cos\theta+Bsin\theta##

##u=\frac{GM}{h^2}+c_1cos\theta+c_2sin\theta##​

I ran the initial nonhomogeneous DE through an online solver, and got this exact same solution. However, in my book the answer is given as:

##u = C cos(\theta+\delta)+\frac{GM}{h^2}##​

Where ##C## and ##\delta## are integration constants.

Any help on where I have gone wrong here? I hope I have provided all the required information in this post.

Related Introductory Physics Homework Help News on Phys.org
phyzguy
If you apply the angle sum and difference relations, you should be able to see that your solution and the solution in the book are the same. The book has just stated it in a different way. In other words, given your c1 and c2, there are values of C and δ for which the two forms are equal.

• Andrea94
If you apply the angle sum and difference relations, you should be able to see that your solution and the solution in the book are the same. The book has just stated it in a different way. In other words, given your c1 and c2, there are values of C and δ for which the two forms are equal.
Ah that's true! Didn't even think about that, thank you.

epenguin
Homework Helper
Gold Member
Not having any textbooks by me I am not even sure whether all authors class an equation where the 'forcing function' on the RHS is just a constant, K say, as non-homogeneous. At any rate it is very easily and naturally transformed into a homogeneous one just by changing the variable ##u## into ##y##, ##y=(u-\frac{K}{a_0})##. Then the constant is eliminated,, and all the terms with derivatives p essentially unchanged ##a_{r}\dfrac {d^{ r} u}{ d\theta ^{r}}## = ##a_{r}\dfrac {d^{ r} y}{ d\theta ^{r}}##

This corresponds to a (physically natural) choice of coordinate origin as the equilibrium position of the system. This has the advantage of simplicity - you know you are going to get only sine and not cosine terms in the result. (if you want to choose as origin a point of maximum displacement then you can get only cosine and not sine terms.) It may be good to grasp both the general formulation you have waded through and the simpler version often practically usable and then preferable.

Last edited:
• Andrea94
Not having any textbooks by me I am not even sure whether all authors class an equation where the 'forcing function' on the RHS is just a constant, K say, as non-homogeneous. At any rate it is very easily and naturally transformed into a homogeneous one just by changing the variable ##u## into ##y##, ##y=(u-\frac{K}{a_0})##. Then the constant is eliminated,, and all the terms with derivatives p essentially unchanged ##a_{r}\dfrac {d^{ r} u}{ d\theta ^{r}}## = ##a_{r}\dfrac {d^{ r} y}{ d\theta ^{r}}##

This corresponds to a (physically natural) choice of coordinate origin as the equilibrium position of the system. This has the advantage of simplicity - you know you are going to get only sine and not cosine terms in the result. (if you want to choose as origin a point of maximum displacement then you can get only cosine and not sine terms.) It may be good to grasp both the general formulation you have waded through and the simpler version often practically usable and then preferable.
Yes this is a very meaningful point and I'm glad you brought it up, I should probably have mentioned that the author at the end chose precisely a coordinate system that leads to ##\delta=0## and hence eliminating the occurrence of multiple trigonometric functions, just as you say.