2.3.6 Problem 6

Maple
Mathematica
Sympy

Internal problem ID [9063]
Book : First order enumerated odes
Section : section 3. First order odes solved using Laplace method
Problem number : 6
Date solved : Sunday, March 30, 2025 at 02:06:00 PM
CAS classification : [_separable]

Solve

ty+y=0

Since no initial condition is explicitly given, then let

y(0)=c1

We will now apply Laplace transform to each term in the ode. Since this is time varying, the following Laplace transform property will be used

tnf(t)L(1)ndndsnF(s)

Where in the above F(s) is the laplace transform of f(t). Applying the above property to each term of the ode gives

yLY(s)tyLY(s)s(ddsY(s))

Collecting all the terms above, the ode in Laplace domain becomes

sY=0

The above ode in Y(s) is now solved.

Since the ode has the form Y=f(s), then we only need to integrate f(s).

dY=0ds+c2Y=c2

Applying inverse Laplace transform on the above gives.

(1)y=c2δ(t)

Substituting initial conditions y(0)=c1 and y(0)=c1 into the above solution Gives

c1=c2δ(0)

Solving for the constant c2 from the above equation gives

c2=c1δ(0)

Substituting the above back into the solution (1) gives

y=c1δ(t)δ(0)
Figure 2.73: Slope field ty+y=0
Maple. Time used: 0.077 (sec). Leaf size: 8
ode:=diff(y(t),t)*t+y(t) = 0; 
dsolve(ode,y(t),method='laplace');
 
y=c1δ(t)

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

Let’s solvet(ddty(t))+y(t)=0Highest derivative means the order of the ODE is1ddty(t)Separate variablesddty(t)y(t)=1tIntegrate both sides with respect totddty(t)y(t)dt=1tdt+C1Evaluate integralln(y(t))=ln(t)+C1Solve fory(t)y(t)=eC1tRedefine the integration constant(s)y(t)=C1t
Mathematica. Time used: 0.023 (sec). Leaf size: 16
ode=t*D[y[t],t]+y[t]==0; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
y(t)c1ty(t)0
Sympy. Time used: 0.106 (sec). Leaf size: 5
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(t*Derivative(y(t), t) + y(t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
y(t)=C1t