Initial-Value Problem with $\pi$

183 Views Asked by At

$$t^3\frac{dy}{dt} + 3t^2y = \cos t$$

$$y(\pi) = 0$$

If I follow the general method from the book I get:

$$(3y\cos t - 3y)dy = \frac{1}{t}dt$$

How do I continue?

Appreciate all help!

3

There are 3 best solutions below

0
On

Your ODE simplifies to: $$ \frac{d}{dt}\left(t^3y\right) = \cos t$$

You can integrate both sides to solve this and then use the initial condition.

1
On

Hint: integrate on both sides, between $0$ and $y'$ on the LHS, and between $\pi$ and $t'$ on the RHS.

You can prefer first simplifying using John's answer.

0
On

I realize this post was made 2 years ago, but since no answer was accepted, I figured I'd make a more full explanation, in case anyone lands here via Google search.


The method you used from the book is called Separation of Variables. This method works only on certain types of problems. When you put $dy$ on one side and $dt$ on the other, you want to see something like this: $$\text{[expression involving only }y]dy = \text{[expression involving only }t]dt$$ However, you got something different; in fact, you cannot use Separation of Variables on this ODE as-is. Instead, you should use the method of Integrating Factors. Here's the run-down of this method:

  1. Ensure every term containing $y$ is on the LHS.
  2. Divide both sides by the coefficient of $\frac{dy}{dt}$. In your case, we would divide both sides by $t^3$ to obtain $$\frac{dy}{dt} + \frac{3}{t}y = \frac{\cos t}{t^3}$$ Let's call this equation "(*)".
  3. Write down the coefficient of the term containing a single $y$. In this case, you'd write down $\frac{3}{t}$. Let's give it a name--say, $f(t)$.
  4. Compute the following function: $\mu(t) = e^{\int f(t)dt}$. Yes, you read that right--an integral written in the exponent. Don't worry, our answer will simplify nicely. In this example, we get $$\mu(t) = e^{\int\frac{3}{t}dt} = e^{3\int\frac{1}{t}dt} = e^{3\ln(t)} = e^{\ln(t^3)} = t^3$$ (Notice I also threw away that "$+C$" everyone always told you to remember when integrating. It is important generally, but in computing $\mu(t)$, the "$+C$" is simply extra work that will be discarded later anyway.)
  5. Multiply both sides of (*) by what you found for $\mu(t)$: $$t^3\frac{dy}{dt} + 3t^2y = \cos t$$ Now, at this point, you might have realized this is what we started with. This will not always happen, hence why I'm showing you this method. With some experience, you'll see when you need to go through steps 1 - 5 and when you won't. In this particular example, as @John_dydx mentioned, you can skip to step 6, which I will now explain.
  6. This is probably the hardest step when you first learn Integrating Factors, since it takes some thought on "working the puzzle backwards", so to speak. Let's consider only the LHS, and look at the first term. I'll write it slightly differently, as shown: $$t^3\frac{dy}{dt} = t^3\frac{d}{dt}(y)$$ Notice that the $\frac{d}{dt}$ operator is being applied to $y$. Now, what happens if we switch it up--that is, switch $t^3$ and $y$ and simplify? $$y\frac{d}{dt}(t^3) = y\cdot 3t^2$$ This is exactly our second term! That's not a coincidence, either. Turns out, $\mu(t)$ was defined as that funky function above to help make this happen. It's pretty, but let's see why it's useful.
  7. Let's write down what we have so far; I'll write our result from step 5 on the LHS, and what we just found from step 6 on the RHS: $$t^3\frac{dy}{dt} + 3t^2y = t^3\frac{d}{dt}(y) + y\frac{d}{dt}(t^3)$$ Notice how the $y$ and $t^3$ trade places, and the $\frac{d}{dt}$ operator only takes a derivative of one of those things at a time? Does this remind you of anything? Say, if $u$ and $v$ are two functions of $t$, $$\frac{d}{dt}(uv) = u\frac{d}{dt}(v) + v\frac{d}{dt}(u)$$ This is simply the Product Rule for derivatives. Of course, when learning this rule for the first time, we start with some stuff on the LHS, and then expand it using the RHS. When using the Integrating Factor method, we actually do just the opposite: we start with the expanded version (the RHS in the Product Rule), and then work toward the condensed version (the LHS). Here's what that looks like in action: $$t^3\frac{d}{dt}(y) + y\frac{d}{dt}(t^3) = \frac{d}{dt}(t^3y)$$ So let's update our ODE now: $$\frac{d}{dt}(t^3y) = \cos t$$ Compare this to what you started with. Before, we had $y$'s everywhere in our equation. Now, it's only in one spot, which makes the equation a LOT easier to solve. Step 8 will do just that.
  8. Integrate both sides to get rid of the derivative, then divide both sides by $t^3$: $$t^3y = \int \cos t dt = \sin t + C$$ $$\implies y = \frac{\sin t + C}{t^3}$$
  9. Use the initial condition ($y(\pi) = 0$) to get rid of that $+C$: $$0 = y(\pi) = \frac{\sin \pi + C}{\pi^3} = \frac{C}{\pi^3}$$ $$\implies C = 0$$ $$\implies y = \frac{\sin t}{t^3}$$ This is our final solution.

Note of caution: in steps 2 and 8, we divided by $t^3$. This can cause problems if we are asked to consider $t = 0$ later on, since by dividing by $t^3$, we are implicitly assuming $t \neq 0$. This can especially cause problems if we ever have to divide by some expression involving $y$, as this can get rid of some possible solutions.