63.1.2 problem 1(b)

Internal problem ID [12947]
Book : A First Course in Differential Equations by J. David Logan. Third Edition. Springer-Verlag, NY. 2015.
Section : Chapter 1, First order differential equations. Section 1.1 First order equations. Exercises page 10
Problem number : 1(b)
Date solved : Wednesday, March 05, 2025 at 08:54:29 PM
CAS classification : [_separable]

\begin{align*} x^{\prime }&=-\frac {t}{x} \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 27
ode:=diff(x(t),t) = -t/x(t); 
dsolve(ode,x(t), singsol=all);
 
\begin{align*} x \left (t \right ) &= \sqrt {-t^{2}+c_{1}} \\ x \left (t \right ) &= -\sqrt {-t^{2}+c_{1}} \\ \end{align*}
Mathematica. Time used: 0.083 (sec). Leaf size: 39
ode=D[x[t],t]==-t/x[t]; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\begin{align*} x(t)\to -\sqrt {-t^2+2 c_1} \\ x(t)\to \sqrt {-t^2+2 c_1} \\ \end{align*}
Sympy. Time used: 0.223 (sec). Leaf size: 22
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(t/x(t) + Derivative(x(t), t),0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ \left [ x{\left (t \right )} = - \sqrt {C_{1} - t^{2}}, \ x{\left (t \right )} = \sqrt {C_{1} - t^{2}}\right ] \]