Problem 2

Question

Solve the differential equation. $$ \frac{d y}{d x}=4-y $$

Step-by-Step Solution

Verified
Answer
The solution to the given differential equation is \(y = 4 ± C1e^{-x}\).
1Step 1: Rearrange The Equation
Rearrange the differential equation in order to separate the variables. This is done by moving all terms involving \(y\) to one side and all terms involving \(x\) to the other.\nSo, we re-write the differential equation as, \(dy/(4 - y) = dx.\)
2Step 2: Integrate Both Sides
Once the equation is rearranged, the next step is to integrate both sides. When integrating, remember to include the constant of integration 'C'.\nThus, we obtain, \(\int dy/(4 - y) = \int dx.\) This will result in \(- ln|4-y| = x + C. \)
3Step 3: Solve For Y
To isolate \(y\), first, remove the natural logarithm using an exponential function. This will give |4-y| = e^(-x-C). Then, write this absolute value equation as a piecewise function and solve for \(y\).\nSo, finally we get, \(y = 4 - e^{C}e^{-x}\) or \(y = 4 + e^{C}e^{-x}\). Note that \(e^{C}\) is just another constant, we can denote it as \(C1\). Therefore, the general solution to the given differential equation is \(y = 4 ± C1e^{-x}\).