Solve the following differential equation, 𝑒 to the power 𝑦 minus five multiplied by 𝑦 prime equals two add cos of 𝑥.
We’re going to solve this first-order differential equation by separating the variables. We firstly remember that 𝑦 prime is the same as d𝑦 by d𝑥. So, let’s write out our differential equation with this in mind. And our aim when we’re separating the variables is to have functions of 𝑦 and d𝑦 on one side of the equals and functions of 𝑥 and d𝑥 on the other side.
Although d𝑦 by d𝑥 isn’t a fraction, we do treat it a little bit like a fraction when we’re trying to separate variables to solve a differential equation. So, we can rewrite our differential equation as 𝑒 to the power 𝑦 minus five d𝑦 equals two add cos of 𝑥 d𝑥. And now, we have our function of 𝑦 and d𝑦 on one side of the equals and our function of 𝑥 and d𝑥 on the other side.
Our next step is to integrate both sides of this equation. To integrate the left-hand side, let’s recall the general rule that when we integrate 𝑒 to the 𝑎𝑥 power with respect to 𝑥, we get one over 𝑎 multiplied by 𝑒 to the 𝑎𝑥 power plus a constant of integration, 𝑐. We also recall that to integrate a constant with respect to 𝑥, we get 𝑎𝑥 add a constant of integration. And so, applying both these rules, we find that 𝑒 to the power 𝑦 minus five integrates to 𝑒 to the power 𝑦 minus five 𝑦. And I’ll come to the constants of integration in a moment.
But for now, let’s integrate the right-hand side of this equation, two add cos of 𝑥, with respect to 𝑥. We’ve already seen how to integrate constants. So, two integrates to two 𝑥. And to integrate cos of 𝑥, we recall a useful cycle. We can see here what each of these functions differentiates to. And if we reverse the arrows, we see what each of these functions integrates to.
So, cos of 𝑥 integrates to sin of 𝑥. And if you’re wondering why I haven’t added a constant of integration for any of the terms yet, it’s because we don’t need a constant of integration for each term. We just need one constant of integration, which we can call 𝑐. And that gives us our final answer, 𝑒 to the power 𝑦 minus five 𝑦 equals two 𝑥 add sin of 𝑥 add 𝑐.