2.3.1 Problem 1
Internal
problem
ID
[10332]
Book
:
First
order
enumerated
odes
Section
:
section
3.
First
order
odes
solved
using
Laplace
method
Problem
number
:
1
Date
solved
:
Monday, January 26, 2026 at 09:43:05 PM
CAS
classification
:
[_linear]
\begin{align*}
y^{\prime } t +y&=t \\
y \left (0\right ) &= 5 \\
\end{align*}
Using Laplace transform method.
Entering first order ode laplace time varying solverWe will now apply Laplace transform to each
term in the ode. Since this is time varying, the following Laplace transform property will be used
\begin{align*} t^{n} f \left (t \right ) &\xrightarrow {\mathscr {L}} (-1)^n \frac {d^n}{ds^n} F(s) \end{align*}
Where in the above \(F(s)\) is the laplace transform of \(f \left (t \right )\). Applying the above property to each term of the
ode gives
\begin{align*} y &\xrightarrow {\mathscr {L}} Y \left (s \right )\\ y^{\prime } t &\xrightarrow {\mathscr {L}} -Y \left (s \right )-s \left (\frac {d}{d s}Y \left (s \right )\right )\\ t &\xrightarrow {\mathscr {L}} \frac {1}{s^{2}} \end{align*}
Collecting all the terms above, the ode in Laplace domain becomes
\[
-s Y^{\prime } = \frac {1}{s^{2}}
\]
The above ode in Y(s) is now
solved.
Entering first order ode quadrature solverSince the ode has the form \(Y^{\prime }=f(s)\), then we only need to
integrate \(f(s)\).
\begin{align*} \int {dY} &= \int {-\frac {1}{s^{3}}\, ds}\\ Y &= \frac {1}{2 s^{2}} + c_1 \end{align*}
\begin{align*} Y&= \frac {1}{2 s^{2}}+c_1 \end{align*}
Applying inverse Laplace transform on the above gives.
\begin{align*} y = \frac {t}{2}+c_1 \delta \left (t \right )\tag {1} \end{align*}
Substituting initial conditions \(y \left (0\right ) = 5\) and \(y^{\prime }\left (0\right ) = 5\) into the above solution Gives
\[
5 = c_1 \delta \left (0\right )
\]
Solving for the constant \(c_1\) from
the above equation gives \begin{align*} c_1 = \frac {5}{\delta \left (0\right )} \end{align*}
Substituting the above back into the solution (1) gives
\[
y = \frac {t}{2}+\frac {5 \delta \left (t \right )}{\delta \left (0\right )}
\]
|
|
|
| Solution plot for \(y^{\prime } t +y = t\) | Direction fields for \(y^{\prime } t +y = t\) |
| | |
| | |
|
|
|
| Isoclines for \(y^{\prime } t +y = t\) |
|
2.3.1.1 ✓ Maple. Time used: 0.069 (sec). Leaf size: 16
ode:=diff(y(t),t)*t+y(t) = t;
ic:=[y(0) = 5];
dsolve([ode,op(ic)],y(t),method='laplace');
\[
y = \frac {5 \delta \left (t \right )}{\delta \left (0\right )}+\frac {t}{2}
\]
Maple trace
Methods for first order ODEs:
--- Trying classification methods ---
trying a quadrature
trying 1st order linear
<- 1st order linear successful
Maple step by step
\[ \begin {array}{lll} & {} & \textrm {Let's solve}\hspace {3pt} \\ {} & {} & \left [t \left (\frac {d}{d t}y \left (t \right )\right )+y \left (t \right )=t , y \left (0\right )=5\right ] \\ \bullet & {} & \textrm {Highest derivative means the order of the ODE is}\hspace {3pt} 1 \\ {} & {} & \frac {d}{d t}y \left (t \right ) \\ \bullet & {} & \textrm {Isolate the derivative}\hspace {3pt} \\ {} & {} & \frac {d}{d t}y \left (t \right )=1-\frac {y \left (t \right )}{t} \\ \bullet & {} & \textrm {Group terms with}\hspace {3pt} y \left (t \right )\hspace {3pt}\textrm {on the lhs of the ODE and the rest on the rhs of the ODE}\hspace {3pt} \\ {} & {} & \frac {d}{d t}y \left (t \right )+\frac {y \left (t \right )}{t}=1 \\ \bullet & {} & \textrm {The ODE is linear; multiply by an integrating factor}\hspace {3pt} \mu \left (t \right ) \\ {} & {} & \mu \left (t \right ) \left (\frac {d}{d t}y \left (t \right )+\frac {y \left (t \right )}{t}\right )=\mu \left (t \right ) \\ \bullet & {} & \textrm {Assume the lhs of the ODE is the total derivative}\hspace {3pt} \frac {d}{d t}\left (y \left (t \right ) \mu \left (t \right )\right ) \\ {} & {} & \mu \left (t \right ) \left (\frac {d}{d t}y \left (t \right )+\frac {y \left (t \right )}{t}\right )=\left (\frac {d}{d t}y \left (t \right )\right ) \mu \left (t \right )+y \left (t \right ) \left (\frac {d}{d t}\mu \left (t \right )\right ) \\ \bullet & {} & \textrm {Isolate}\hspace {3pt} \frac {d}{d t}\mu \left (t \right ) \\ {} & {} & \frac {d}{d t}\mu \left (t \right )=\frac {\mu \left (t \right )}{t} \\ \bullet & {} & \textrm {Solve to find the integrating factor}\hspace {3pt} \\ {} & {} & \mu \left (t \right )=t \\ \bullet & {} & \textrm {Integrate both sides with respect to}\hspace {3pt} t \\ {} & {} & \int \left (\frac {d}{d t}\left (y \left (t \right ) \mu \left (t \right )\right )\right )d t =\int \mu \left (t \right )d t +\mathit {C1} \\ \bullet & {} & \textrm {Evaluate the integral on the lhs}\hspace {3pt} \\ {} & {} & y \left (t \right ) \mu \left (t \right )=\int \mu \left (t \right )d t +\mathit {C1} \\ \bullet & {} & \textrm {Solve for}\hspace {3pt} y \left (t \right ) \\ {} & {} & y \left (t \right )=\frac {\int \mu \left (t \right )d t +\mathit {C1}}{\mu \left (t \right )} \\ \bullet & {} & \textrm {Substitute}\hspace {3pt} \mu \left (t \right )=t \\ {} & {} & y \left (t \right )=\frac {\int t d t +\mathit {C1}}{t} \\ \bullet & {} & \textrm {Evaluate the integrals on the rhs}\hspace {3pt} \\ {} & {} & y \left (t \right )=\frac {\frac {t^{2}}{2}+\mathit {C1}}{t} \\ \bullet & {} & \textrm {Simplify}\hspace {3pt} \\ {} & {} & y \left (t \right )=\frac {t^{2}+2 \mathit {C1}}{2 t} \\ \bullet & {} & \textrm {Solution does not satisfy initial condition}\hspace {3pt} \end {array} \]
2.3.1.2 ✗ Mathematica
ode=t*D[y[t],t]+y[t]==t;
ic={y[0]==5};
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
Not solved
2.3.1.3 ✓ Sympy. Time used: 0.218 (sec). Leaf size: 5
from sympy import *
t = symbols("t")
y = Function("y")
ode = Eq(t*Derivative(y(t), t) - t + y(t),0)
ics = {y(0): 5}
dsolve(ode,func=y(t),ics=ics)
\[
y{\left (t \right )} = \frac {t}{2}
\]
Python version: 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0]
Sympy version 1.14.0
classify_ode(ode,func=y(t))
('factorable', '1st_exact', '1st_linear', 'Bernoulli', '1st_homogeneous_coeff_best', '1st_homogeneous_coeff_subs_indep_div_dep', '1st_homogeneous_coeff_subs_dep_div_indep', 'almost_linear', 'lie_group', 'nth_linear_euler_eq_nonhomogeneous_undetermined_coefficients', 'nth_linear_euler_eq_nonhomogeneous_variation_of_parameters', '1st_exact_Integral', '1st_linear_Integral', 'Bernoulli_Integral', '1st_homogeneous_coeff_subs_indep_div_dep_Integral', '1st_homogeneous_coeff_subs_dep_div_indep_Integral', 'almost_linear_Integral', 'nth_linear_euler_eq_nonhomogeneous_variation_of_parameters_Integral')