Internal
problem
ID
[8986]
Book
:
First
order
enumerated
odes
Section
:
section
1
Problem
number
:
2
Date
solved
:
Friday, February 21, 2025 at 09:02:40 PM
CAS
classification
:
[_quadrature]
Solve
Time used: 0.029 (sec)
Since the ode has the form \(y^{\prime }=f(x)\), then we only need to integrate \(f(x)\).
Summary of solutions found
Time used: 0.178 (sec)
Applying change of variables \(y = u \left (x \right ) x\), then the ode becomes
Which is now solved The ode
is separable as it can be written as
Where
Integrating gives
We now need to find the singular solutions, these are found by finding for what values \(g(u)\) is zero, since we had to divide by this above. Solving \(g(u)=0\) or
for \(u \left (x \right )\) gives
Now we go over each such singular solution and check if it verifies the ode itself and any initial conditions given. If it does not then the singular solution will not be used.
Therefore the solutions found are
Solving for \(u \left (x \right )\) gives
Converting \(u \left (x \right ) = a\) back to \(y\) gives
Converting \(u \left (x \right ) = \frac {\left (x \,{\mathrm e}^{c_1} a -1\right ) {\mathrm e}^{-c_1}}{x}\) back to \(y\) gives
Summary of solutions found
Time used: 0.056 (sec)
To solve an ode of the form
We assume there exists a function \(\phi \left ( x,y\right ) =c\) where \(c\) is constant, that satisfies the ode. Taking derivative of \(\phi \) w.r.t. \(x\) gives
Hence
But since \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) then for the above to be valid, we require that
If the above condition is satisfied, then the original ode is called exact. We still need to determine \(\phi \left ( x,y\right ) \) but at least we know now that we can do that since the condition \(\frac {\partial ^{2}\phi }{\partial x\partial y}=\frac {\partial ^{2}\phi }{\partial y\partial x}\) 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
Therefore
Comparing (1A) and (2A) shows that
The next step is to determine if the ODE is is exact or not. The ODE is exact when the following condition is satisfied
Using result found above gives
And
Since \(\frac {\partial M}{\partial y}= \frac {\partial N}{\partial x}\), then the ODE is exact The following equations are now set up to solve for the function \(\phi \left (x,y\right )\)
Integrating (1) w.r.t. \(x\) gives
Where \(f(y)\) is used for the constant of integration since \(\phi \) is a function of both \(x\) and \(y\). Taking derivative of equation (3) w.r.t \(y\) gives
But equation (2) says that \(\frac {\partial \phi }{\partial y} = 1\). Therefore equation (4) becomes
Solving equation (5) for \( f'(y)\) gives
Integrating the above w.r.t \(y\) gives
Where \(c_1\) is constant of integration. Substituting result found above for \(f(y)\) into equation (3) gives \(\phi \)
But since \(\phi \) itself is a constant function, then let \(\phi =c_2\) where \(c_2\) is new constant and combining \(c_1\) and \(c_2\) constants into the constant \(c_1\) gives the solution as
Solving for \(y\) gives
Summary of solutions found
`Methods for first order ODEs: --- Trying classification methods --- trying a quadrature trying 1st order linear <- 1st order linear successful`
Solving time : 0.000
(sec)
Leaf size : 9
dsolve(diff(y(x),x) = a,y(x),singsol=all)
Solving time : 0.003
(sec)
Leaf size : 11
DSolve[{D[y[x],x]==a,{}},y[x],x,IncludeSingularSolutions->True]
Solving time : 0.052
(sec)
Leaf size : 7
Python version: 3.13.1 (main, Dec 4 2024, 18:05:56) [GCC 14.2.1 20240910] Sympy version 1.13.3
from sympy import * x = symbols("x") a = symbols("a") y = Function("y") ode = Eq(-a + Derivative(y(x), x),0) ics = {} dsolve(ode,func=y(x),ics=ics)
Eq(y(x), C1 + a*x)