29.1.1 problem 0

Internal problem ID [4608]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 1
Problem number : 0
Date solved : Sunday, March 30, 2025 at 03:30:16 AM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }&=a f \left (x \right ) \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 12
ode:=diff(y(x),x) = a*f(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = a \int f \left (x \right )d x +c_1 \]
Mathematica. Time used: 0.003 (sec). Leaf size: 20
ode=D[y[x],x]==a*f[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \int _1^xa f(K[1])dK[1]+c_1 \]
Sympy. Time used: 0.219 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
f = Function("f") 
ode = Eq(-a*f(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + a \int f{\left (x \right )}\, dx \]