# Simple solution to complicated ODE

In a certain fluid mechanics problem, the following equation for a stream function $f(R)$ must be solved

$$A^2 + f f'' = (f' )^2, \quad 0 < R < 1/2,$$

with boundary conditions $f(1/2) = -1$ and $f'(1/2) = 0$. $R = r^2/2$ is a re-scaled version of the radius. In this problem, the axial pressure gradient $A^2$ can be treated as an eigenvalue, which enforces the axis $R=0$ to be a stream line, thus providing the additional condition $f(0) = 0$.

I am able to identify a fairly simple solution $f = - \sin{(\pi R)}$ for which $A = \pi$ necessarily. I am amazed by the simplicity of the solution and I am unable to find it using standard techniques...

If, for instance, I ask Mathematica for a solution for $A \neq \pi$ (without boundary conditions), it gives:

\begin{align*} & f = -\frac{1}{2} e^{-e^{c_1} R-2 c_1-e^{c_1} c_2} \left(A^2 e^{2 c_1}-e^{2 e^{c_1} \left(c_2+R\right)}\right) \\ & f = \frac{1}{2} \left(e^{-e^{c_1} R-2 c_1-e^{c_1} c_2}-A^2 e^{e^{c_1} R+e^{c_1} c_2}\right) \end{align*}

which is far from amenable for imposing boundary conditions. Is there any simpler way to find the simple solution $f = -\sin{\pi R}$?

Edit

I have just discovered that, if instead of $R = r^2/2$ you introduce $R = A r^2 /2$, then the problem reduces to

$$1 + f f'' = (f' )^2, \quad 0 < R < A/2,$$

whose solution Mathematica gives in a simpler way:

$$f = \pm a_1 \sinh[(r+a_2)/a_1]$$

or, equivalently,

$$f = \pm b_1 \sin[(r+b_2)/b_1]$$

where, I guess, $a_1$ and $a_2$ become complex valued once I impose the boundary conditions.

Now we are left with imposing the BCs, but I continue to have doubts about getting to this form of solution...

• If $f(0)=0$, then wouldn't the solution Mathematica gives only work when $a_2=0$? – Semiclassical May 15 '17 at 17:07
• what is the condition $f(1/2) = -1$ for? – user66081 May 15 '17 at 17:12
• @user66081, that gives you the radial inflow velocity to the cylinder. Semiclassical, Mathematica actually says that 'for some branches of the general solution, unable to solve the conditions'. – Dmoreno May 15 '17 at 17:19