47.1.25 problem 25

Internal problem ID [7406]
Book : Ordinary differential equations and calculus of variations. Makarets and Reshetnyak. Wold Scientific. Singapore. 1995
Section : Chapter 1. First order differential equations. Section 1.1 Separable equations problems. page 7
Problem number : 25
Date solved : Wednesday, March 05, 2025 at 04:26:55 AM
CAS classification : [_quadrature]

\begin{align*} x^{\prime }+t&=1 \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 12
ode:=diff(x(t),t)+t = 1; 
dsolve(ode,x(t), singsol=all);
 
\[ x \left (t \right ) = -\frac {1}{2} t^{2}+t +c_{1} \]
Mathematica. Time used: 0.002 (sec). Leaf size: 16
ode=D[x[t],t]+t==1; 
ic={}; 
DSolve[{ode,ic},x[t],t,IncludeSingularSolutions->True]
 
\[ x(t)\to -\frac {t^2}{2}+t+c_1 \]
Sympy. Time used: 0.145 (sec). Leaf size: 10
from sympy import * 
t = symbols("t") 
x = Function("x") 
ode = Eq(t + Derivative(x(t), t) - 1,0) 
ics = {} 
dsolve(ode,func=x(t),ics=ics)
 
\[ x{\left (t \right )} = C_{1} - \frac {t^{2}}{2} + t \]