2.1.32 Problem 33

Existence and uniqueness analysis
Solved using first_order_ode_autonomous
Solved using first_order_ode_exact
Solved using first_order_ode_dAlembert
Maple
Mathematica
Sympy

Internal problem ID [8743]
Book : Own collection of miscellaneous problems
Section : section 1.0
Problem number : 33
Date solved : Friday, April 25, 2025 at 05:02:00 PM
CAS classification : [_quadrature]

Existence and uniqueness analysis

Solve

y=11y

With initial conditions

y(0)=2

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

y=f(t,y)=11+y

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

{y<11<y}

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

fy=y(11+y)=1(1+y)2

The y domain of fy when t=0 is

{y<11<y}

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

Solved using first_order_ode_autonomous

Time used: 0.036 (sec)

Solve

y=11y

With initial conditions

y(0)=2

Integrating gives

(1y)dy=dty12y2=t+c1

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

yy22=t

Solving for y gives

y=1+12t
Solution plot Slope field y=11y

Summary of solutions found

y=1+12t
Solved using first_order_ode_exact

Time used: 0.057 (sec)

Solve

y=11y

With initial conditions

y(0)=2

To solve an ode of the form

(A)M(x,y)+N(x,y)dydx=0

We assume there exists a function ϕ(x,y)=c where c is constant, that satisfies the ode. Taking derivative of ϕ w.r.t. x gives

ddxϕ(x,y)=0

Hence

(B)ϕx+ϕydydx=0

Comparing (A,B) shows that

ϕx=Mϕy=N

But since 2ϕxy=2ϕyx then for the above to be valid, we require that

My=Nx

If the above condition is satisfied, then the original ode is called exact. We still need to determine ϕ(x,y) but at least we know now that we can do that since the condition 2ϕxy=2ϕyx is satisfied. If this condition is not satisfied then this method will not work and we have to now look for an integrating factor to force this condition, which might or might not exist. The first step is to write the ODE in standard form to check for exactness, which is

(1A)M(t,y)dt+N(t,y)dy=0

Therefore

(1+y)dy=(1)dt(2A)(1)dt+(1+y)dy=0

Comparing (1A) and (2A) shows that

M(t,y)=1N(t,y)=1+y

The next step is to determine if the ODE is is exact or not. The ODE is exact when the following condition is satisfied

My=Nt

Using result found above gives

My=y(1)=0

And

Nt=t(1+y)=0

Since My=Nt, then the ODE is exact The following equations are now set up to solve for the function ϕ(t,y)

(1)ϕt=M(2)ϕy=N

Integrating (1) w.r.t. t gives

ϕtdt=Mdtϕtdt=1dt(3)ϕ=t+f(y)

Where f(y) is used for the constant of integration since ϕ is a function of both t and y. Taking derivative of equation (3) w.r.t y gives

(4)ϕy=0+f(y)

But equation (2) says that ϕy=1+y. Therefore equation (4) becomes

(5)1+y=0+f(y)

Solving equation (5) for f(y) gives

f(y)=1+y

Integrating the above w.r.t y gives

f(y)dy=(1+y)dyf(y)=y+12y2+c2

Where c2 is constant of integration. Substituting result found above for f(y) into equation (3) gives ϕ

ϕ=ty+12y2+c2

But since ϕ itself is a constant function, then let ϕ=c3 where c2 is new constant and combining c2 and c3 constants into the constant c2 gives the solution as

c2=ty+12y2

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

ty+y22=0

Solving for y gives

y=1+12t
Solution plot Slope field y=11y

Summary of solutions found

y=1+12t
Solved using first_order_ode_dAlembert

Time used: 0.065 (sec)

Solve

y=11y

With initial conditions

y(0)=2

Let p=y the ode becomes

p=11y

Solving for y from the above results in

(1)y=p1p

This has the form

(*)y=tf(p)+g(p)

Where f,g are functions of p=y(t). The above ode is dAlembert ode which is now solved.

Taking derivative of (*) w.r.t. t gives

p=f+(tf+g)dpdt(2)pf=(tf+g)dpdt

Comparing the form y=tf+g to (1A) shows that

f=0g=p1p

Hence (2) becomes

(2A)p=p(t)p2

The singular solution is found by setting dpdt=0 in the above which gives

p=0

No valid singular solutions found.

The general solution is found when dpdt0. From eq. (2A). This results in

(3)p(t)=p(t)3

This ODE is now solved for p(t). No inversion is needed.

Integrating gives

1p3dp=dt12p2=t+c4

Singular solutions are found by solving

p3=0

for p(t). This is because we had to divide by this in the above step. This gives the following singular solution(s), which also have to satisfy the given ODE.

p(t)=0

Substituing the above solution for p in (2A) gives

y=(12c42t1)2c42t

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

y=(112t1)12t

Which simplifies to

y=1+12t
Solution plot Slope field y=11y

Summary of solutions found

y=1+12t
Maple. Time used: 0.049 (sec). Leaf size: 13
ode:=diff(y(t),t) = 1/(1-y(t)); 
ic:=y(0) = 2; 
dsolve([ode,ic],y(t), singsol=all);
 
y=1+12t

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[ddty(t)=11y(t),y(0)=2]Highest derivative means the order of the ODE is1ddty(t)Solve for the highest derivativeddty(t)=11y(t)Separate variables(ddty(t))(1y(t))=1Integrate both sides with respect tot(ddty(t))(1y(t))dt=1dt+C1Evaluate integraly(t)y(t)22=t+C1Solve fory(t){y(t)=112C12t,y(t)=1+12C12t}Redefine the integration constant(s){y(t)=12t+C1,y(t)=1+2t+C1}Use initial conditiony(0)=22=1C1Solve for_C1No solutionSolution does not satisfy initial conditionUse initial conditiony(0)=22=1+C1Solve for_C1C1=1Substitute_C1=1into general solution and simplifyy(t)=1+2t+1Solution to the IVPy(t)=1+2t+1
Mathematica. Time used: 0.003 (sec). Leaf size: 16
ode=D[y[t],t]==1/(1-y[t]); 
ic=y[0]==2; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
y(t)12t+1
Sympy. Time used: 0.416 (sec). Leaf size: 12
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(Derivative(y(t), t) - 1/(1 - y(t)),0) 
ics = {y(0): 2} 
dsolve(ode,func=y(t),ics=ics)
 
y(t)=12t+1