Group Abstract Group Abstract

Message Boards Message Boards

0
|
9.3K Views
|
3 Replies
|
4 Total Likes
View groups...
Share
Share this post:

How to solve a second order nonlinear ordinary differential equation?

Posted 12 years ago

Hollo, I am trying to solve a second order nonlinear ODE with a given boundary conditions at infinity. My equation looks like this $$\frac{d^2 u}{dx^2} = - \frac{dV}{du} $$ where $V=\frac{1}{2}u^2 - \frac{1}{4}u^4$.

I tried to use this line $$sol = DSolve[u''[x] == u[x]^3 - u[x], u[-Infinity] == 1 , u[Infinity] == -1, u[x], x]$$ but it resulted in nothing that I can comprehend $$ DSolve::dsfun: "u[-\[Infinity]]==1 cannot be used as a function."$$ The solution for this boundary condition problem is $$u = \mp \tanh \left( \frac{x}{\sqrt{2}} \right) $$

Attachments:
POSTED BY: Omer Tzuk
3 Replies

Using the substitution $u'(x)=v(u(x))$ which results in $u''(x)=v'(u)u'(x)$ or $u''(x)=v'(u)v(u)$. Plugging these in the ode result in a first order nonlinear ode in $v(u)$ which is $v'(u)+\frac{u}{v(u)}-\frac{u^3}{v(u)}=0$ which can now be solved for $v(u)$. Now use this solution to solve for the first oder order ode $u'(x)=v(u(x))$. The problem is with the boundary conditions at $\pm \infty$. btw, you had them reversed.

I had to sneek in a simpler boundary conditions at zero.

The solution is in terms of inverse function with logs, which you can try to convert to trig. But I plotted it and it does match the $\frac{\tanh(x)}{\sqrt{2}}$. I only used one of the 2 solutions here.

Clear[u, v, x];
eq = v'[u] + u/v[u] - u^3/v[u] == 0;
sol = v[u] /. First@DSolve[{eq, v[0] == 1/Sqrt[2]}, v[u], u];
sol = u[x] /. First@DSolve[{u'[x] == (sol /. u -> u[x]), u[0] == 0}, u[x], x]

enter image description here

Plotting it side-by-side to the proposed solution shows it is the same

Row[{
  Plot[sol /. x -> t, {t, -Pi, Pi}, ImageSize -> Medium, PlotLabel -> "DSolve"],
  Plot[Tanh[x/Sqrt[2]], {x, -Pi, Pi}, ImageSize -> Medium, PlotLabel -> "Given solution"]}
 ]

enter image description here

POSTED BY: Nasser M. Abbasi
Posted 12 years ago

Any tip on how can I solve $v'(u) + \frac{u}{v(u)} - \frac{u^3}{v(u)} =0$ analytically?

POSTED BY: Omer Tzuk
POSTED BY: Nasser M. Abbasi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard