# Let's say I have something like$$d^2 u / d x^2 = u + u^2 / 1. Jul 21, 2012 ### grav-universe Let's say I have something like [tex]d^2 u / d x^2 = u + u^2 / a$$, where $$u = 1/r$$

How do I integrate to solve for x in terms of r?

2. Jul 21, 2012

### Robert1986

Re: derivatives

If $u=1/r$, then you are going to have to use the chain rule on the LHS to get something like:

$$\frac{2}{r^3}\big(\frac{dr}{dx}\big)^2-\frac{1}{r^2}\frac{d^2r}{dx^2}= \frac{1}{r}+\frac{1}{ar^2}$$

Unless I have just really screwed something up, I don't see how this ODE can be solved, since each $r$ is (presumably) a function of $x$

EDIT:
I should say that I don't know how to solve it.

3. Jul 21, 2012

### grav-universe

Re: derivatives

Dang, I don't know how you did that, so I should have just posted the actual equation I am looking for, although I didn't realize until now that it would reduce to mostly constants. It is

$$d^2u / dθ^2 = a u^2 - u + b$$

where u = 1/r and a and b are constants. θ isn't a function of r except as related in the equation after the integration as far as I can tell.

From what you have, (dr / dx)^2 would be exactly what I am looking for. It still includes a term for a second derivative of $$d^2r / dx^2$$, though, but if we just solved for u first, could we susbstitute back in for the second derivative of $$d^2u / dx^2$$ from the original equation, then integrate using u, then just change u to 1/r in the final form? I suppose just solving for du / dθ with the equation I just gave would be easiest, and I could take it from there.

Last edited: Jul 21, 2012
4. Jul 21, 2012

### Robert1986

Re: derivatives

Well, if $u$ is a function of $\theta$ then this is just a Non-homogeneuous ODE (which is incredibly tough to solve, I think.) However, $u$ is a function of $r$ which means you must use the chain rule to get the second derivative of $u$ with respect to $\theta$. Then, you get a DE that I have no idea how to solve (and I suspect there is no solution.)

5. Jul 21, 2012

### grav-universe

Re: derivatives

Okay, thank you, Robert1986. I'll see if I can find something else that approximates it.

6. Jul 21, 2012

### Robert1986

Re: derivatives

Hold on; I had a minor malfunction.

Yes, I believe you can solve this for $u(x)$ and then $r(x)=1/u(x)$. However, this is a very hard ODE to solve.

7. Jul 22, 2012

### haruspex

Re: derivatives

By change of variables, you can massage it into the form
y'' = y2+c [1]
where |c| = 1, and the sign of c is that of ab-1/4.