2.3.4 Problem 4

Maple
Mathematica
Sympy

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

Solve

ty+y=0

With initial conditions

y(0)=y0

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+c1Y=c1

Applying inverse Laplace transform on the above gives.

(1)y=c1δ(t)

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

y0=c1δ(0)

Solving for the constant c1 from the above equation gives

c1=y0δ(0)

Substituting the above back into the solution (1) gives

y=y0δ(t)δ(0)

The solution was found not to satisfy the ode or the IC. Hence it is removed.

Maple. Time used: 0.077 (sec). Leaf size: 12
ode:=diff(y(t),t)*t+y(t) = 0; 
ic:=y(0) = y__0; 
dsolve([ode,ic],y(t),method='laplace');
 
y=y0δ(t)δ(0)

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 solve[t(ddty(t))+y(t)=0,y(0)=y0]Highest 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)=C1tSolution does not satisfy initial condition
Mathematica
ode=t*D[y[t],t]+y[t]==0; 
ic=y[0]==y0; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 

Not solved

Sympy. Time used: 0.104 (sec). Leaf size: 3
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(t*Derivative(y(t), t) + y(t),0) 
ics = {y(0): y__0} 
dsolve(ode,func=y(t),ics=ics)
 
y(t)=0