# Exponential second member

1. Nov 11, 2007

### Heimdall

Hello,

I'm trying to solve this equation :

$$\frac{d^2f\left(x\right)}{dx^2}= A\exp\left(f\left(x\right)/B\right)$$

(which comes from plasma equilibrium)

I can't find out what's the general solution... is there a method to solve with this kind of second member

2. Nov 11, 2007

### arildno

Well, you can make some headway as follows:
$$\frac{d^{2}f}{dx^{2}}f'(x)=Ae^{\frac{f}{B}}f'(x)\to\frac{1}{2}((f'(x))^{2}-(f'(x_{0}))^{2})=BA(e^{\frac{f(x)}{B}}-e^{\frac{f(x_{0})}{B}$$
Whereby it follows that:
$$f'(x)^{2}=Ce^{\frac{f}{B}}+K$$
where C=2AB, and K depends on the values of the function and its derivative at [itex]x_{0}[/tex]

There is no particular reason why this should have a simple exact solution.

3. Nov 11, 2007

### Heimdall

lets say that $$f\left(x_0=0\right)=f'\left(0\right)=0$$

so that we have :

$$f'^2 = 2BA\left(\exp\left(f/B\right)-1\right)$$

or $$f'^2 = 4AB\exp\left(f/2B\right)sinsh\left(f/2B\right)$$

I know there's a trick somewhere because the solution should be something like

$$log\left(cosh\left(\right)\right)$$

Last edited: Nov 11, 2007
4. Nov 11, 2007

### arildno

Okay, let's see:

Let:
$$u^{2}=e^{\frac{f}{B}}\to{2u}\frac{du}{dx}=u\frac{f'}{B}\to{2Bdu}=f'dx$$
This substitution seems very promising..
We get:
$$\frac{f'}{\sqrt{2AB}\sqrt{e^{\frac{f}{B}}-1}}=\pm{1}$$
$$\sqrt{\frac{2B}{A}}\int\frac{du}{\sqrt{u^{2}-1}}=\pm{x}+C$$
We set u=Cosh(v), yielding:
$$\sqrt{\frac{2B}{A}}sgn(Sinh(v))v=\pm{x}+C$$
essentially yielding the result for f you mentioned; just get the signs right.

Last edited: Nov 11, 2007
5. Nov 11, 2007

### Heimdall

Hum,

$$2u\frac{du}{dx} = \frac{f'}{B}e^{f/B} = \frac{f'}{B}u^2$$

which means that

$$2B\frac{du}{u} = f'dx$$

now the integral is :

$$\int\frac{2Bdu}{u\sqrt{u^2-1}}$$

and with your u = ch(v) you get

$$\int \frac{dv}{ch\left(v\right)}$$

6. Nov 11, 2007

### arildno

Okay, made a mistake there.

7. Nov 11, 2007

### Heimdall

I've looked on the web and

$$\int \frac{dv}{ch\left(v\right)} = gd\left(v\right)$$

where gd(v) is the Gudermannian function :

$$gd\left(v\right) = 2\arctan\left(th\left(\frac{v}{2}\right)\right)$$

which doesn't look nice if you come back to f

8. Nov 11, 2007

### Heimdall

I haven't seen it the first time but you can't even do this if x=0 (because f(0)=0)

9. Nov 12, 2007

### arildno

That need not be destructive, since f' is zero also.
You have an improper integral.

10. Nov 12, 2007

### arildno

So, then we continue!

We set y=tanh(v/2)$$\frac{dy}{dv}=\frac{1}{2}\frac{1}{Cosh^{2}(\frac{v}{2})}=\frac{1}{2}(1-y^{2})\to{dv}=\frac{2dy}{1-y^{2}}$$
Thereby, we get:
$$\int\frac{1*dv}{Cosh(v)}=\int\frac{Cosh^{2}(\frac{v}{2})-Sinh^{2}(\frac{v}{2})}{Cosh^{2}(\frac{v}{2})+Sinh^{2}(\frac{v}{2})}dv=\int\frac{1-y^{2}}{1+y^{2}}\frac{2dy}{1-y^{2}}=\int\frac{2dy}{1+y^{2}}=2arctan(y)+C$$
And we are essentially done.

Last edited: Nov 12, 2007
11. Nov 12, 2007

### arildno

I didn't see this post. Sorry about that.

12. Nov 12, 2007

### Heimdall

Hi :)

In the mean time I got another solution :

$$I = \int\frac{f'dx}{\sqrt{1-\exp{\left(f/B\right)}}}$$

let $$u^2 = 1-\exp{\left(f/B\right)}$$

so we have :

$$-2Budu\frac{1}{1-u^2} = f'dx$$

and we get :

$$I = -2B\int \frac{du}{1-u^2} = -2Bargth\left(u\right)$$

$$I = -2Bargth\left(\sqrt{1-\exp{\left(f/K\right)}}\right) = -\sqrt{2AB}x$$

$$\sqrt{1-\exp{\left(f/B\right)}} = th\left(\sqrt{\frac{A}{2B}x}\right)$$

$$f = -2B\ Ln\left(ch\left(\sqrt{\frac{A}{2B}}x\right)\right)$$ :)

13. Nov 12, 2007

### arildno

Note that in this case, you have 1-exp beneath the square root sign; not exp-1.

That will naturally yield a totally different solution, valid whenever AB<0, K>0.