Azzera filtri
Azzera filtri

finding laplace transform of heaviside function

5 visualizzazioni (ultimi 30 giorni)
Brenda Galabe
Brenda Galabe il 13 Dic 2018
Risposto: Walter Roberson il 13 Dic 2018
trying to get lapace and plot :
θ” + 2θ′ + 6θ = [H(t) − H(t − 1)],
θ(0) = 4, θ′ (0) = 5,
H is the Heaviside function defined by
H(t) = { 0, x < 0, 1, x ≥ 0.
Find and sketch θ(t).
my code : error with dsolve
laplace('heaviside(t)-heaviside(t-1)',t,s)
syms t theta gensoln initsoln
eq = 'D2theta + 2*Dtheta + 6*theta -heaviside(t)+heaviside(t-1)'
initsoln = dsolve(deq,'theta(0)=6, Dtheta(0)=6', 't')
pretty(initsoln)
  3 Commenti
Brenda Galabe
Brenda Galabe il 13 Dic 2018
other differential like these worked just as is the only thing that was changed is theta
Brenda Galabe
Brenda Galabe il 13 Dic 2018
i think i got got it suppose to be dsolve(eq) not dsolve(deq)

Accedi per commentare.

Risposte (1)

Walter Roberson
Walter Roberson il 13 Dic 2018
sympref('HeavisideAtOrigin',1); %needs R2015a or later
syms s t
expr1 = heaviside(t)-heaviside(t-1);
expr2 = laplace(expr1, t, s) %not sure why we are doing this ??
syms theta(t)
Dtheta = diff(theta);
D2theta = diff(Dtheta);
deq = D2theta + 2*Dtheta + 6*theta == expr1;
initsoln = simplify( dsolve(deq, theta(0)==6, Dtheta(0)==6, t) )
Not sure what this has to do with laplace ?

Categorie

Scopri di più su Mathematics in Help Center e File Exchange

Prodotti


Release

R2015b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by