Section 1.3 More Involved Examples
Subsection 1.3.1 Solve
As with always, we begin by solving
Question 1.3.1. How do I solve
Set \(y = e^{rt}\) to obtain \(r^2 + 2r + 5 = 0\text{.}\) This holds when
So, \(y = e^{(-1 + 2i)t}\) is a solution of \(y'' + 2y' + 5y = 0\text{.}\) Recall that if \(y(t)\) is a solution of a linear ODE, then so are \(\Re\{y(t)\}\) (real part of \(y\)) and \(\Im\{y(t)\}\) (imaginary part of \(y\)). Writing out \(e^{(-1 + 2i)t}\) shows that
Therefore, the general solution of \(y'' + 2y' + 5y = 0\) is
Question 1.3.2. How did you calculate
Here's the work of all this:
Question 1.3.3. How do I do this in Mathematica?
When we want to calculate \(\displaystyle\int f(x) \ dx\text{,}\) we use the command Integrate[f[x], x]
.
In this case, the integrals of \(u_1'(t)\) and \(u_2'(t)\) can be calculated using
u1[t_] = Integrate[Exp[-t] * Sin[2t] * Sin[t], t] u2[t_] = Integrate[Exp[-t] * Cos[2t] * Sin[t], t]
Question 1.3.4. How do I do this in Matlab?
When we want to calculate \(\displaystyle\int f(x) \ dx\text{,}\) we use the command int(f(x), x)
.
Here, we can calculate the integrals of \(u_1'\) and \(u_2'\) using
u1(t) = int(-exp(-t) * sin(2 * t) * sin(t), t) u2(t) = int(-exp(-t) * cos(2 * t) * sin(t), t)
Question 1.3.5. How do I do this in Maple?
The integration command is actually very similar to what you'd use for Matlab, so you'd use
u1 := int(-exp(-t) * sin(2 * t) * sin(t), t) u2 := int(-exp(-t) * cos(2 * t) * sin(t), t)
Question 1.3.6. How do I do this in Sage? (+ bonus Sage cell).
It's just as simple for Sage as the others: if we wanted to integrate \(f(x)\text{,}\) then we'd write integrate(f(x), x)
.
There's a Sage window below with the commands already in. Try it out by clicking the “Evaluate Sage” button!
xxxxxxxxxx
t = var('t')
u1(t) = integrate(-exp(-t) * sin(2 * t) * sin(t), t)
u2(t) = integrate(exp(-t) * cos(2 * t) * sin(t), t)
print("u1(t) = ", u1(t))
print("u2(t) = ", u2(t))
Question 1.3.7. As what does approach?
The answer is pretty simple: as \(t \to \infty\) we get \(y(t) \to 0\text{.}\)
As hinted to before, the general solution \(y(t)\) can be summarized pretty well with the equation
Both \(y_b(t)\) and \(Y_b(t)\) are bounded for all \(t \in \mathbb{R}\text{.}\)
Question 1.3.8. What does it mean for \(y_b(t)\) to be “bounded”?
Intuitively, we mean to say that \(y_b(t)\) never goes to infinity for any real \(t\text{.}\)
More rigourously, we'd say that there exists constants \(A\) and \(B\) such that \(A \leq y_b(t) \leq B\) for all real \(t\text{.}\)
The important takeaway is that \(y_b(t)\) never gets “extremely big”, as big as something like \(e^{t}\) as \(t \to \infty\text{.}\)
You can think of \(y_b\) fitting between two horizontal lines on the \(xy\)-plane.
Subsection 1.3.2 Suppose Which initial values allow as
There's a lot to unpack here! The first thing we might think to do is to solve that ODE. And, as with most inhomogeneous ODEs, we solve the homogeneous ODE version first.
Question 1.3.9. How do I solve
Question 1.3.10. How do I find
As we've seen a lot already, it's good to memorize at least one of the forms of variation of parameters. Personally, my favorite form to memorize is
Question 1.3.11. What's
We took \(c_2 = 0\text{.}\) Differentiating \(y(t)\) give us