# Second order nonlinear differential equation problem

1. Jun 11, 2005

### bilgek33

I need to solve the following second order nonlinear differential equation:

z''(b) * [6(1 - f)z(b) + (1+f)b z'(b)] = (15 - 9 f)[z'(b)]^2 + [2(1 - f) z(b) z'(b)] / b + [4 f z'(b)^(5/2)] / b^(1/2)

where f is a constant between [0,1].

initial conditions are z(0)=0 and z'(0)=0

I couldn't solve it analytically (except for f = 1 case). I tried numerical solution but my initial conditions have singularity.

In case, here is the more detailed Pdf file for the equation:
http://www.people.virginia.edu/~bk5w/home_files/trouble.pdf

I don't know whether this is a singularity of first kind of the second.
I wonder whether you guys can help me to solve this problem.
Thanks

2. Jun 12, 2005

### saltydog

Hello Bilgek. Welcome to PF. We have some very bright people in here better than me that I believe can help you. I await their comments. In the interim period may I ask the following:

For the case of f=1, I get:

$$2x^{3/2}z^{'}z^{''}=6x^{1/2}(z^{'})^2+4(z^{'})^{5/2}$$

(just use x to make it easy to read for me)
You indicated you solved this analytically. You mind explaining how?

Also, I like the terminology of "singular initial value problem". Do you expect a unique solution? The reason is that I recently worked on:

$$ty^{''}+(t-1)y^{'}+y=t^2;\quad y(0)=0,\quad y^{'}(0)=0$$

Yea, I know it's a baby one compared to yours.

Anyway, I obtained a non-unique soltuion at t=0. I would expect the same for your equation. Are you?

3. Jun 12, 2005

### saltydog

Alright, I'm making progress. Just factor out a z', then let:

$$u=z^{'}$$

This results in:

$$u^{'}-\frac{3}{x}u+2x^{-3/2}u^{1/2}=0$$

Edit: I wish to qualify the above steps. I can factor a z' only if it's not zero. Thus I must specify that the resulting equation is only valid for z'$\neq 0$.

Edit2: Also, note the 5/2 exponent on z'. Thus I would assume the equation admits only solutions monotonically increasing in the first quadrant.

Edit3: Made a mistake on the equation in u above earlier (omitted the u^1/2) corrected it above.

Last edited: Jun 12, 2005
4. Jun 12, 2005

### bilgek33

Hi saltydog. Thanks for the welcome.
Your solution way when f=1 is correct and it is true that it works when b is not 0.
Hence, I also think that the solution is not unique when b=0.
I also provided different ways of solving it when f=1. (I attached a pdf file below).

Do you know how to prove that z'(b) is nondecreasing in b.

If you have time take a look at both the attachment below and the following link:
http://www.people.virginia.edu/~bk5w/home_files/trouble.pdf
Take care.
Best.

#### Attached Files:

• ###### ode2.pdf
File size:
90.9 KB
Views:
139
Last edited: Jun 12, 2005
5. Jun 12, 2005

### bilgek33

I also what I meant by singular initial value problem is the following
my initial conditions are
z(0)=0 and z'(0)=0
However, when b=0, the differential equation I wrote before, involves division by zero, which creates a problem.

6. Jun 13, 2005

### saltydog

Bilgek, I've looked at your attachment and reviewed your method of solving the equation when f=1. I did notice a minor difficulty when you integrated the expression for p. I got a different log expression for it yet your answer came out right. Typo? Anyway it's very nice. What can you say about uniqueness at a point for the equation:

$$y^{''}=g(x,y,y^{'})$$

when g and it's partials with respect to y and y' are not continuous at the point?

For the record I'd like to document the (partial) solution for f=1 in LaTeX:

So we have the singular initial-value problem:

$$z^{''}[6(1-f)z+(1+f)bz^{'}]=(15-9f)(z^{'})^2+\frac{[2(1-f)zz^{'}]}{b}+\frac{4f(z{'})^{5/2}}{b^{1/2}};\quad z(0)=0,\quad z^{'}(0)=0$$

with independent variable b and:

$$0<f\leq 1$$

Letting f=1 we obtain:

$$bz^{'}z^{''}=3(z^{'})^2+\frac{2(z^{'})^{5/2}}{b^{1/2}}$$

Dividing by $bz^{'}$ we obtain:

$$z^{''}=\frac{3z^{'}}{b}+2(\frac{z^{'}}{b})^{3/2}\quad\text{for}\quad b\ne0\quad\text{and}\quad z^{'}>0$$

Note I placed the positive restriction on $z^{'}$ since we divided by it as well as the fact that it appears raised to the 5/2 power in the original equation. That is, the equation admits real solutions only if the slope is greater than 0. Agree?

Letting $u=z^{'}$ we have:

$$u^{'}=\frac{u}{b}[3+2(\frac{u}{b}})^{1/2}]$$

Letting:

$$p=(\frac{u}{b})^{1/2},\quad bp^2=u,\quad,u^{'}=2bp^{'}+p^2\quad\text{gives:}$$

$$p^{'}=-\frac{p}{2b}+\frac{p}{2b}(3+2p)$$

thus:

$$\int\frac{dp}{p(p+1)}=\int\frac{db}{b}$$

$$ln(\frac{p}{p+1})=ln(b)+k$$

$$p(b)=\frac{Kb}{1-Kb}$$

7. Jun 13, 2005

### bilgek33

Thanks again for your interest, saltydog.
You are right there is typo there, but the result is the same. Here is the corrected one: http://www.people.virginia.edu/~bk5w/home_files/ode2.pdf

One another thing is f is between [0,1], which means it can be zero as well (when you wrote, you didn't include zero).

In terms of your question regarding uniqueness, to be honest, I don't know.

Any idea what to do when f is not 1 ??

Last edited: Jun 13, 2005
8. Jun 13, 2005

### saltydog

I don't know either about what happens to uniqueness and it's becomming a very interesting problem for me: If g(t,y,y') and its partials are continuous at a point then we can be assured of a unique solution about the point. However, the proof of such I am familiar with makes no comment about uniqueness if they are not continuous.

I don't know what to do if f is not 1. Working it numerically "close to zero" is unacceptable to you right?

Maybe/hopefully someone else here more knowledgeable than I will post a comment and we can both learn.

9. Jun 13, 2005

### bilgek33

numerical solution

It is actually ok for me to obtain a numerical solution close to zero.
However, my background in computational stuff is not very good, since I am a theorist. I just tried to do it numerically with some software (Mathematica) but couldn't do it since it says (there is singularity, division by zero at the given initial conditions).
I am open to suggestions also in terms of numerical solution.

Thanks saltydog.

10. Jun 13, 2005

### saltydog

Hello Bilgek. I think Mathematica IS doing it but is simply running into a singularity. That's not a problem but rather a reflection of robustness. I've used Mathematica a lot. For one thing, you're not specifying the initial conditions at zero are you? You need to specify z(0.001) and z'(0.001) right? Or just close to it. I'll spend some time with NDSolve and the general case and see what I come up with.

11. Jun 13, 2005

### bilgek33

Somebody also told me about using matlab. He said "ode45" can do it, but I don't know matlab good enough to do it.

12. Jun 14, 2005

### saltydog

Here's the code to study the equation in Mathematica:

Code (Text):

$$ode=z''[b](6(1 - f)z[b] + (1 + f) b z'[b]) ==\\ (15-9f)(z'[b])^2+\frac{2(1-f)z[b]z'[b]}{b}+\frac{4f(z'[b])^{5/2}}{b^{1/2}}$$

bstart = choose something;
bend = 1.2;
zderivstart = 0.01;
zstart = 0.01;
plist = Table[{0}, {10}];
f = 0;
For[i = 1, i <= 10, i++,
f += 0.1;
sol1 =
NDSolve[{ode, z[bstart] == zstart, z'[bstart] == zderivstart},
z, {b, bstart, bend}];
fn1[t_] := Evaluate[z[t] /. Flatten[sol1]];
plist[[i]] =
Plot[fn1[t], {t, bstart, bend}, PlotRange -> {{0, bend}, {0, 2}}
];
];
fin1 = Show[{plist}, PlotLabel -> {StyleForm["b0=chose here", FontSize -> 16]}]

Case 1: z(0.3)=0.01, z'(0.3)=0.01

As f is varied from 0.1 to 1, the derivative grows larger and larger until a vertical asymptote is reached. For this case, this occurrs at about b=2. This is exhibited in the first plot.

Case 2: z(0.2)=0.01, z'(0.2)=0.01

The same behavior is encountered however, the derivative is increasing faster. In this case the vertical asymptote is not reached until f=1 and b is about 1.1 (neglect the vertical line near 1).

Case 3: z(0.1)=0.01, z'(0.1)=0.01

As f is varied from 0.1 to 0.9, the plot rises faster and faster until at f=0.5, a vertical asymptote is encountered at around 1 and is a function of f. That is, when f=0.5, the asymptote is reached at about 1.14, when f=0.6, it's about 1.0, when f=0.7, its 0.95, and so on for increasing f. The first group of plots exhibits this behavior (the vertical lines are spurious and are not to be considered).

The trend seems to become more severe as b0 approaches 0. My suspicion is that perhaps a delta function satisfies the equation at b0=0. Often in cases like these it's crucial to have an understanding of what the equation models in real life. Does the behavior exhibited below conform to a real-world application and do delta functions have any relevance?

Edit: Perhaps it's not correct to say "a vertical asymptote is reached". Mathematica just encounters a slope with a very high value.

#### Attached Files:

File size:
5.7 KB
Views:
77
File size:
7.5 KB
Views:
71
• ###### b0=0.1.JPG
File size:
8.2 KB
Views:
47
Last edited: Jun 14, 2005
13. Jun 15, 2005

### bilgek33

hi saltydog,
Thnak you for the code. I couldn't manage to plot everything in one figure. How did you do that? Because when I used your code, it plotted all of the graphs separately.

I have another question. As far as I understood, you tell me that for a given b value, the higher the 'f' is the higher the z'. But it is counterintuitive to me (in terms of modeling intuition). The figure is right but I would expect that, again for a given b value,the lower is the 'f' the higher is the z'. Can you check the graph one more time? (Since I couldn't plot all in one, I couldn't check it myself)
Thanks

14. Jun 15, 2005

### bilgek33

Hi saltydog,
I tried to do it one more time and I think what happens is the outer graph is the f=1, and the inner graph is the f=0. When you plot the figure, it shows the last one (which is i=10) the first somehow and the first one (i=1) the last. You can try by individually drawing the figures when f=0 and f=1 and comparing them.
Thank you.

15. Jun 15, 2005

### bilgek33

uppss!!
Maybe I am wrong!

16. Jun 15, 2005

### saltydog

Hello Bilgek. Perhaps I made a mistake in grouping 10 plots at a time. It's best then to do one at a time to confirm the behavior as a function of f. This is the code to do so. You'll have to manually set the various parameters each time then run it. Also, note that I changed ode to a function as ode[f_]:=

Remember Mathematica will run up against very steep slopes and stop the algorithm so you'll have to adjust bstart and bend along with f to get some form of a solution.

Below I have it set up to start at b=0.3 with z(0.3)=0.01 and z'(0.3)=0.01 and with f=0.8

Code (Text):

ode[f_]:=
$$z''[b](6(1 - f)z[b] + (1 + f) b z'[b]) ==\\ (15-9f)(z'[b])^2+\frac{2(1-f)z[b]z'[b]}{b}+\frac{4f(z'[b])^{5/2}}{b^{1/2}}$$

bstart = 0.3;
bend = 2;
zderivstart = 0.01;
zstart = 0.01;
f = 0.8;
sol1 =
NDSolve[{ode[f], z[bstart] == zstart, z'[bstart] == zderivstart},
z, {b, bstart, bend}];
fn1[t_] := Evaluate[z[t] /. Flatten[sol1]];

plt1=
Plot[fn1[t], {t, bstart, bend}, PlotRange -> {{0, bend}, {0, 10}}
];

Last edited: Jun 15, 2005
17. Jun 18, 2005

### bilgek33

the last code

Thank you saltydog.
I will look at it.

18. Aug 3, 2010

### gayatriv

Hi

This is Gayatri. I was searching for a method to solve nonlinear differential equations when I came across this thread.

I am stuck with one of the nonlinear differential equations which I have not been able to solve analytically or numerically.It will be of great help if someone can help me in this regard.

The equation which I have is :
y'[x]^2 == (y[x]^2 - c^2) - ((y[x]^2*p^2)*(y[x]^2 - 2*c^2))

Here p and c are constants. The boundary conditions are
y[0]=x0^2
y[L]=c^2

Gayatri