7.2.22 problem 24
Internal
problem
ID
[40]
Book
:
Elementary
Differential
Equations.
By
C.
Henry
Edwards,
David
E.
Penney
and
David
Calvis.
6th
edition.
2008
Section
:
Chapter
1.
First
order
differential
equations.
Section
1.3.
Problems
at
page
27
Problem
number
:
24
Date
solved
:
Thursday, March 13, 2025 at 03:15:40 PM
CAS
classification
:
[[_Riccati, _special]]
\begin{align*} y^{\prime }&=x +\frac {y^{2}}{2} \end{align*}
With initial conditions
\begin{align*} y \left (-2\right )&=0 \end{align*}
✓ Maple. Time used: 0.085 (sec). Leaf size: 68
ode:=diff(y(x),x) = x+1/2*y(x)^2;
ic:=y(-2) = 0;
dsolve([ode,ic],y(x), singsol=all);
\[
y = \frac {2^{{2}/{3}} \left (\operatorname {AiryAi}\left (1, -\frac {2^{{2}/{3}} x}{2}\right ) \operatorname {AiryBi}\left (1, 2^{{2}/{3}}\right )-\operatorname {AiryBi}\left (1, -\frac {2^{{2}/{3}} x}{2}\right ) \operatorname {AiryAi}\left (1, 2^{{2}/{3}}\right )\right )}{\operatorname {AiryBi}\left (1, 2^{{2}/{3}}\right ) \operatorname {AiryAi}\left (-\frac {2^{{2}/{3}} x}{2}\right )-\operatorname {AiryBi}\left (-\frac {2^{{2}/{3}} x}{2}\right ) \operatorname {AiryAi}\left (1, 2^{{2}/{3}}\right )}
\]
✓ Mathematica. Time used: 0.133 (sec). Leaf size: 262
ode=D[y[x],x]==x+1/2*y[x]^2;
ic={y[-2]==0};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\[
y(x)\to \frac {\sqrt {2} x^{3/2} \left (2 \operatorname {BesselJ}\left (-\frac {4}{3},-\frac {4 i}{3}\right )+i \operatorname {BesselJ}\left (-\frac {1}{3},-\frac {4 i}{3}\right )-2 \operatorname {BesselJ}\left (\frac {2}{3},-\frac {4 i}{3}\right )\right ) \operatorname {BesselJ}\left (-\frac {2}{3},\frac {1}{3} \sqrt {2} x^{3/2}\right )-2 \sqrt {2} x^{3/2} \operatorname {BesselJ}\left (-\frac {2}{3},-\frac {4 i}{3}\right ) \operatorname {BesselJ}\left (-\frac {4}{3},\frac {1}{3} \sqrt {2} x^{3/2}\right )+2 \operatorname {BesselJ}\left (-\frac {2}{3},-\frac {4 i}{3}\right ) \left (\sqrt {2} x^{3/2} \operatorname {BesselJ}\left (\frac {2}{3},\frac {1}{3} \sqrt {2} x^{3/2}\right )-2 \operatorname {BesselJ}\left (-\frac {1}{3},\frac {1}{3} \sqrt {2} x^{3/2}\right )\right )}{x \left (4 \operatorname {BesselJ}\left (-\frac {2}{3},-\frac {4 i}{3}\right ) \operatorname {BesselJ}\left (-\frac {1}{3},\frac {1}{3} \sqrt {2} x^{3/2}\right )+\left (-2 \operatorname {BesselJ}\left (-\frac {4}{3},-\frac {4 i}{3}\right )-i \operatorname {BesselJ}\left (-\frac {1}{3},-\frac {4 i}{3}\right )+2 \operatorname {BesselJ}\left (\frac {2}{3},-\frac {4 i}{3}\right )\right ) \operatorname {BesselJ}\left (\frac {1}{3},\frac {1}{3} \sqrt {2} x^{3/2}\right )\right )}
\]
✗ Sympy
from sympy import *
x = symbols("x")
y = Function("y")
ode = Eq(-x - y(x)**2/2 + Derivative(y(x), x),0)
ics = {y(-2): 0}
dsolve(ode,func=y(x),ics=ics)
TypeError : bad operand type for unary -: list