2.1.18 Problem 18

Existence and uniqueness analysis
Solved using first_order_ode_autonomous
Maple
Mathematica
Sympy

Internal problem ID [8729]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 18
Date solved : Friday, April 25, 2025 at 04:58:17 PM
CAS classification : [_quadrature]

Existence and uniqueness analysis

Solve

y=1+yy2

With initial conditions

y(0)=1

This is non linear first order ODE. In canonical form it is written as

y=f(x,y)=1+yy2

The y domain of f(x,y) when x=0 is

{1y<0,0<y}

And the point y0=1 is inside this domain. Now we will look at the continuity of

fy=y(1+yy2)=1y22(1+y)y321+yy2

The y domain of fy when x=0 is

{y<1,1<y<0,0<y}

And the point y0=1 is inside this domain. Therefore solution exists and is unique.

Solved using first_order_ode_autonomous

Time used: 0.182 (sec)

Solve

y=1+yy2

With initial conditions

y(0)=1

Integrating gives

11+yy2dy=dx21+yy2y(y2)3=x+c1

The following diagram is the phase line diagram. It classifies each of the above equilibrium points as stable or not stable or semi-stable.

Solving for the constant of integration from initial conditions, the solution becomes

21+yy2y(y2)3=x223
Figure 2.42: Slope field y=1+yy2

Summary of solutions found

21+yy2y(y2)3=x223
Maple. Time used: 0.381 (sec). Leaf size: 146
ode:=diff(y(x),x) = ((y(x)+1)/y(x)^2)^(1/2); 
ic:=y(0) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
y=(1+i3)(122x+9x2+(122x+9x28)(3x22)2)2/34i34(122x+9x2+(122x+9x28)(3x22)2)1/3+44(122x+9x2+(122x+9x28)(3x22)2)1/3

Maple trace

Methods for first order ODEs: 
--- Trying classification methods --- 
trying a quadrature 
trying 1st order linear 
trying Bernoulli 
trying separable 
<- separable successful
 

Maple step by step

Let’s solve[ddxy(x)=1+y(x)y(x)2,y(0)=1]Highest derivative means the order of the ODE is1ddxy(x)Solve for the highest derivativeddxy(x)=1+y(x)y(x)2Separate variablesddxy(x)1+y(x)y(x)2=1Integrate both sides with respect toxddxy(x)1+y(x)y(x)2dx=1dx+C1Evaluate integral2(1+y(x))(2+y(x))31+y(x)y(x)2y(x)=x+C1Solve fory(x){y(x)=(8+9C12+18C1x+9x2+39C14+36C13x+54C12x2+36C1x3+9x416C1232C1x16x2)1/32+2(8+9C12+18C1x+9x2+39C14+36C13x+54C12x2+36C1x3+9x416C1232C1x16x2)1/3+1,y(x)=(8+9C12+18C1x+9x2+39C14+36C13x+54C12x2+36C1x3+9x416C1232C1x16x2)1/341(8+9C12+18C1x+9x2+39C14+36C13x+54C12x2+36C1x3+9x416C1232C1x16x2)1/3+1I3((8+9C12+18C1x+9x2+39C14+36C13x+54C12x2+36C1x3+9x416C1232C1x16x2)1/322(8+9C12+18C1x+9x2+39C14+36C13x+54C12x2+36C1x3+9x416C1232C1x16x2)1/3)2,y(x)=(8+9C12+18C1x+9x2+39C14+36C13x+54C12x2+36C1x3+9x416C1232C1x16x2)1/341(8+9C12+18C1x+9x2+39C14+36C13x+54C12x2+36C1x3+9x416C1232C1x16x2)1/3+1+I3((8+9C12+18C1x+9x2+39C14+36C13x+54C12x2+36C1x3+9x416C1232C1x16x2)1/322(8+9C12+18C1x+9x2+39C14+36C13x+54C12x2+36C1x3+9x416C1232C1x16x2)1/3)2}Simplify{y(x)=(1+I3)(8+9C12+18C1x+9x2+39(C1+x+43)(C1+x43)(x+C1)2)2/34I34(8+9C12+18C1x+9x2+39(C1+x+43)(C1+x43)(x+C1)2)1/3+44(8+9C12+18C1x+9x2+39(C1+x+43)(C1+x43)(x+C1)2)1/3,y(x)=(I31)(8+9C12+18C1x+9x2+39(C1+x+43)(C1+x43)(x+C1)2)2/34I3+4(8+9C12+18C1x+9x2+39(C1+x+43)(C1+x43)(x+C1)2)1/344(8+9C12+18C1x+9x2+39(C1+x+43)(C1+x43)(x+C1)2)1/3,y(x)=(8+9C12+18C1x+9x2+3(9C12+18C1x+9x216)(x+C1)2)1/32+2(8+9C12+18C1x+9x2+3(9C12+18C1x+9x216)(x+C1)2)1/3+1}Use initial conditiony(0)=11=(1+I3)(8+9C12+39(C1+43)(C143)C12)2/34I34(8+9C12+39(C1+43)(C143)C12)1/3+44(8+9C12+39(C1+43)(C143)C12)1/3Solve for_C1C1=RootOf(I3(8+9_Z2+39_Z416_Z2)2/34I3+(8+9_Z2+39_Z416_Z2)2/3+4)RemovesolutionsthatdontsatisfytheODESolution does not satisfy initial conditionUse initial conditiony(0)=11=(I31)(8+9C12+39(C1+43)(C143)C12)2/34I3+4(8+9C12+39(C1+43)(C143)C12)1/344(8+9C12+39(C1+43)(C143)C12)1/3Solve for_C1C1=RootOf(I3(8+9_Z2+39_Z416_Z2)2/3(8+9_Z2+39_Z416_Z2)2/34I34)RemovesolutionsthatdontsatisfytheODESolution does not satisfy initial conditionUse initial conditiony(0)=11=(8+9C12+3(9C1216)C12)1/32+2(8+9C12+3(9C1216)C12)1/3+1Solve for_C1No solutionSolution does not satisfy initial condition
Mathematica. Time used: 0.078 (sec). Leaf size: 123
ode=D[y[x],x]==Sqrt[ (1+y[x])/y[x]^2]; 
ic=y[0]==1; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
y(x)14(1+i3)9x2+81x42162x3+288x264122x3+i(3+i)9x2+81x42162x3+288x264122x3+1
Sympy. Time used: 0.366 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sqrt((y(x) + 1)/y(x)**2) + Derivative(y(x), x),0) 
ics = {y(0): 1} 
dsolve(ode,func=y(x),ics=ics)
 
y(x)11+1yydy=x+111y+1y2dy