44.1.46 problem 48

Internal problem ID [6921]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 1. Introduction to differential equations. Exercises 1.1 at page 12
Problem number : 48
Date solved : Wednesday, March 05, 2025 at 02:50:47 AM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

\begin{align*} {y^{\prime }}^{2}-2 y^{\prime }+4 y&=4 x -1 \end{align*}

Maple. Time used: 0.013 (sec). Leaf size: 22
ode:=diff(y(x),x)^2-2*diff(y(x),x)+4*y(x) = 4*x-1; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= x \\ y &= -\frac {\left (-2 x +2 c_{1} \right )^{2}}{4}+c_{1} -\frac {1}{4} \\ \end{align*}
Mathematica. Time used: 0.085 (sec). Leaf size: 53
ode=D[y[x],x]^2-2*D[y[x],x]+4*y[x]==4*x-1; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -x^2+x-c_1 x-\frac {c_1{}^2}{4} \\ y(x)\to -x^2+x+c_1 x-\frac {c_1{}^2}{4} \\ y(x)\to x \\ \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*x + 4*y(x) + Derivative(y(x), x)**2 - 2*Derivative(y(x), x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
TypeError : argument of type Mul is not iterable