# Revolution around the x-axis of solution to a nonlinear differential equation

I have the following differential equation:

$$\pi\cdot\text{y}(x)^2=\sqrt{1+\text{y}'(x)^2}\tag1$$

With the initial condition $$\text{y}(0)=1$$.

Now, I want to plot the solution in order to obtain the solid of revolution when I rotate the function $$\text{y}(x)$$ around the x-axis between $$0$$ and $$10$$.

How can I obatin the 3D-model of that revolution?

• Your initial conditions lead to (y'[0])^2==-1 which can't be fullfilled for real y! – Ulrich Neumann Aug 5 at 9:28
• @UlrichNeumann true! I edited my question, stupid mistake – Jan Aug 5 at 9:35
• Please explain your ode and show some code if possible. – Ulrich Neumann Aug 5 at 9:45
• This looks familiar... are you looking at constant-curvature surfaces? – J. M.'s discontentment Aug 5 at 23:36
• @J.M. yes I am looking at that! – Jan Aug 5 at 23:37

solve ode

Y = NDSolveValue[{(Pi y[x]^2) == Sqrt[ 1 + y'[x]^2] , y[0] == 1 },y, {x, -1, 1}, Method -> "StiffnessSwitching"]


Solution is only real for -.23<x<.42

revolute around x-axis

ParametricPlot3D[ {x, Y[x] Cos[t], Y[x] Sin[t]}, {x, -.3, 1}, {t, 0,2 Pi}, AxesLabel -> {x, y, z}, BoxRatios -> {1, 1, 1} ]


alternativly RevolutionPlot3D[Y[x], {x, x0, 1}, RevolutionAxis -> {1, 0, 0},BoxRatios -> {1, 1, 1}]

Our purpose is the follolwing graphics:

The ordinary differential equation at hand can be solved exactly in terms of elliptic functions. The solution will be periodic (with singularities) and so the numerical approach is not satisfactory since the solution cannot be continued past singularity unless one takes into account basic properties of elliptic functions.

We would like to solve exactly the given differential equation, however working directly with DSolve we obtain a solution in an implicit form involving elliptic integrals and so in order to get an explicit solution we have to transform equation appropriately. Rewriting the equation we have: $${y'(x)}^2-\pi^2 y(x)^4+1=0$$ Working with such a type of equations one can gain an insight to change the dependent variable $$y(x) \to w(x)\;$$ where $$y(x)=a+\frac{b}{w(x)+c}$$ Our goal is transformig differenial equation for $$y(x)$$ into canonical Weierstrass form $$\;{w'(x)}^2-4w(x)^3+g_2\; w(x)+g_3=0$$.

First we find $$(a,b,c)$$

pol = (((c+w[x])^4 /b^2) (y'[x]^2-Pi^2 y[x]^4+1)/.{ y'[x]-> -b w'[x]/(w[x]+c)^2,
y[x]-> a + b/( w[x]+c)})// Factor // Collect[ #, {w'[x], w[x]}]&;

cl= Coefficient[ pol, w[x], #]&;


Comparing appropriate coefficients with the Weierstras canonical form we have to solve the following system:

Solve[{ cl[4] == 0, cl[3] == -4, cl[2] ==0}, {a,b,c}]


For all triples we have the same equation and since we are interested in the real solutions, the both real triples provide an equivalent graphics.

With[{ a = 1/Sqrt[Pi], b = Sqrt[Pi], c = -Pi/2},
( ((c + w[x])^4 /b^2) (y'[x]^2 - Pi^2 y[x]^4 + 1)/.{ y'[x] ->-b w'[x]/(w[x]+c)^2,
y[x]-> a + b/(w[x]+c)}) // Factor // Collect[ #, { w'[x], w[x]}]&] == 0

- Pi^2 w[x] -4 w[x]^3 + w'[x]^2 == 0


This equation can be solved without prescribing the initial condition

 DSolve[- Pi^2 w[x] -4 w[x]^3 + w'[x]^2 == 0, w[x], x] // TraditionalForm


then we can find c1 from the initial condition $$c_0=y(0)=a+\frac{b}{w(0)+c}$$, i.e. let's put c0=1

c1 = With[{a = 1/Sqrt[Pi], b = Sqrt[Pi], c = -Pi/2, c0 = 1},
InverseWeierstrassP[b/(c0 - a) -c , { -Pi^2, 0}]];


and finally the solution of the Cauchy problem ys[0] == 1 is

ys[x_]:= With[{ a = 1/Sqrt[Pi], b = Sqrt[Pi], c = -Pi/2},
a + b/(WeierstrassP[ x - c1, { -Pi^2, 0}] + c)]



The solution as an elliptic function is doubly periodic, any period is twice the Weierstrass half-period (there are only two independent periods):

wHP = Through @ { WeierstrassHalfPeriodW1, WeierstrassHalfPeriodW2,
WeierstrassHalfPeriodW3} @ { -Pi^2, 0}
N @ %


  {0.73966 - 0.73966 I, -1.47933, 0.73966 + 0.73966 I}


Whenever $$x-c_1 = 2 k\; whp_2$$ the solution becomes infinite, for $$k$$ integer and $$whp_2$$ the real Weierstrass half-period.

Revolution around x-axis we can realize with RevolutionPlot3D. For better visualization we've restricted the graphics appropriately and acted with Re on the solution (to get rid of possible small imaginary perturbations in elliptic functions, one can also exploit Chop).

RevolutionPlot3D[ Re @ ys[x], {x,0, 10},
RegionFunction->Function[{x,y,z}, y^2 + z^2 < 4], RevolutionAxis -> {1, 0, 0},
PlotPoints-> 50, MaxRecursion -> 3]


The plot at the beginning we obtain with:

RevolutionPlot3D[ Re @ ys[x], {x, 0, 10}, RevolutionAxis -> {1, 0, 0},
RegionFunction->Function[{x,y,z}, y^2 + z^2 <6], PlotPoints -> 60,
MaxRecursion -> 3, PerformanceGoal -> "Quality", BoxRatios->{2,1,1},
ViewPoint->{ 3/8, -3/2, 1/2}, ImageSize->Large]


Solve this differential-algebraic equation of order 1/2 with constant boundary condition with the method of separation.

pi y^2=Sqrt[1-y'^2]

pi^2y^4=1-y'^2

y'=+/-Sqrt[1-pi^2y^4]

dy/Sqrt[1-pi^2y^4]=+/-dx

x+constant=Integrate[1/Sqrt[1 - pi^2 y^4], y]

x+constant=-((I EllipticF[I ArcSin[Sqrt[-pi] y], -1])/Sqrt[-pi])


Now there is a unique functional relation between x and y replace the differential equation.

The boundary condition can be used to make this unique.

But this aim was to get a function y[x].

Plot[(-((I EllipticF[I ArcSin[Sqrt[-\[Pi]] y], -1])/
Sqrt[-\[Pi]])), {y, -1, 1}]


The inverse function of the EllipticF is the JacobiAmplitude.

y[x_] := Sin[I JacobiAmplitude[Sqrt[-[Pi]] I x, -1]]/Sqrt[-[Pi]] + 1

This is a real-valued function!

Plot[Sin[I JacobiAmplitude[-Sqrt[-\[Pi]] I x, -1]]/Sqrt[-\[Pi]] +
1, {x, 0, 1}]


The resulting surface of rotation is

RevolutionPlot3D[
Sin[I JacobiAmplitude[-Sqrt[-\[Pi]] I x, -1]]/Sqrt[-\[Pi]] + 1, {x,
0, 1}, RevolutionAxis -> {1, 0, 0}, BoxRatios -> {1, 1, 1}]


Hope that helps. Have fun.

RevolutionPlot3D[
Sin[I JacobiAmplitude[-Sqrt[-\[Pi]] I x, -1]]/Sqrt[-\[Pi]] + 1, {x,
0, 10}, RevolutionAxis -> {1, 0, 0}, BoxRatios -> {1, 1, 1}]


• You wrote the DE the wrong way, it has to be $\sqrt{1\color{red}{+}\left(\text{y}'(x)\right)^2}$ – Jan Aug 5 at 21:23