Resolva uma equação diferencial ordinária com função de força de rampa
Calcule a resposta de rampa pura.
In[1]:=
![Click for copyable input](assets.pt-br/solve-an-ode-with-a-ramp-forcing-function/In_156.png)
sol = DSolveValue[{x''[t] + a^2 x[t] == Ramp[t - a], x[0] == 0,
x'[0] == 0}, x[t], t, Assumptions -> a > 0] // FullSimplify
Out[1]=
![](assets.pt-br/solve-an-ode-with-a-ramp-forcing-function/O_90.png)
Faça um gráfico da solução para diferentes valores do parâmetro .
In[2]:=
![Click for copyable input](assets.pt-br/solve-an-ode-with-a-ramp-forcing-function/In_157.png)
Plot[Table[sol, {a, 1, 2, 0.3}] // Evaluate, {t, -1, 15},
Filling -> Axis]
Out[2]=
![](assets.pt-br/solve-an-ode-with-a-ramp-forcing-function/O_91.png)
Combine a rampa com uma força impulsiva.
In[3]:=
![Click for copyable input](assets.pt-br/solve-an-ode-with-a-ramp-forcing-function/In_158.png)
sol = DSolveValue[{x''[t] + a^2 x[t] ==
Ramp[t - a] + DiracDelta[t - 2 a], x[0] == 0, x'[0] == 0}, x[t],
t, Assumptions -> a > 0] // FullSimplify
Out[3]=
![](assets.pt-br/solve-an-ode-with-a-ramp-forcing-function/O_92.png)
In[4]:=
![Click for copyable input](assets.pt-br/solve-an-ode-with-a-ramp-forcing-function/In_159.png)
Plot[Table[sol, {a, 1, 2, 0.3}] // Evaluate, {t, -1, 15},
Filling -> Axis]
Out[4]=
![](assets.pt-br/solve-an-ode-with-a-ramp-forcing-function/O_93.png)