Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

A couple questions on my homework I'm struggling with are as follows. If anyone could help me with these that would be awesome

$$\frac{dy}{dx} + 3y = 12x+19,\qquad y(0)=-4.$$

$$\frac{dy}{dx}=(4x+9y)/3x\qquad y(1)=2$$

Sorry but here's another that I seem to be getting wrong. $$\frac{dx}{dy}=(x−8)e^{−2y} \qquad y(8)=\ln(8)$$

The solution I get is $y=\ln(2x^2-16x+64)/2$ but apparently that's wrong


share|cite|improve this question
Is the third problem really $\frac{dx}{dy}$ instead of $\frac{dy}{dx}$? – Arturo Magidin Mar 24 '12 at 22:30
If it is $\frac{dy}{dx}$, then it is separable and you can solve it by simple integration; you get $\int e^{2y}\,dy = \int(x-8)\,dx$, or $e^{2y} = 2(\frac{1}{2}x^2 - 8x + C)$, hence $2y=\ln(x^2 -16x+D)$, which means you messed up your arithmetic again. But if the problem has $\frac{dx}{dy}$, then you did it completely wrong. – Arturo Magidin Mar 24 '12 at 22:36

Both differential equations are a kind that often yields to the integrating factor method.

We want to realize the left hand side as the result of differentiating of a product of the form $f(x)y$ (then we would get $(f(x)y)' = f(x)y' + f'(x)y$, "explaining" the sum of a term with $y'$ on it, and a term with $y$ on it).

But it doesn't look like that. That's "probably" because we "simplified" after doing the derivative. So we "unsimplify it". We want to find a function $\mu(x)$ (called an "integrating factor") such that $$\mu(x)\left(\frac{dy}{dx} + 3y\right) = \mu(x)\frac{dy}{dx} + 3\mu(x)y$$ is of the form $$\frac{d}{dx}(\mu(x)y) = \mu(x)\frac{dy}{dx} + \mu'(x)y.$$

That means that we need $3\mu(x) = \mu'(x)$. This differential equation is separable, so we can solve it: $$\begin{align*} \frac{d}{dx}\mu &= 3\mu\\ \frac{d\mu}{\mu} &= 3\,dx\\ \int\frac{d\mu}{\mu} &= \int 3\,dx\\ \ln|\mu| &= 3x + C\\ |\mu| &= Ae^{3x},\qquad A\gt 0\\ \mu &= Ae^{3x},\qquad A\neq 0. \end{align*}$$ So we can let $\mu(x) = e^{3x}$. Multiplying the entire equation by $e^{3x}$, we get: $$ \begin{align*} e^{3x}\frac{dy}{dx} + 3e^{3x}y &= e^{3x}(12x+9)\\ \frac{d}{dx}\left(e^{3x}y\right) &= (12x+9)e^{3x}\\ \int d(e^{3x}y) &= \int (12x+9)e^{3x}\,dx. \end{align*}$$ Now do the integral, solve for $y$, and finally plug in the initial value to determine the value of the constant of integration.

The second problem can be solved similarly. You should rewrite the equation in the form $$\frac{dy}{dx} + q(x)y = f(x);$$ then find an "integrating factor" $\mu(x)$ which, when multiplied through, will give you that the left hand side is exactly the derivative of $\mu(x)y$. (You'll need to solve an auxiliary differential equation $\mu'(x) = q(x)\mu(x)$). Then solve for $y$, and use the initial value.

The third (new) problem would be a simple separable equation if not for the fact that you are interested in the case $x=8$, and at that point you cannot separate (since you cannot divide by $x-8$). Instead, you must again treat it as an integrating factor problem, $$\frac{dx}{dy} -e^{-2y}x = -8e^{-2y}$$ and look for a integrating factor $\mu(y)$ with $\mu'(y) = -\mu(y)e^{-2y}$. This leads to $$\int\frac{d\mu(y)}{\mu(y)} = -\int e^{-2y}\,dy$$ or $$\ln|\mu(y)| = \frac{1}{2}e^{-2y}+C$$ hence $$\mu(y) = e^{\frac{1}{2}e^{-2y}}.$$ So then you have $$\frac{d}{dy}\left( e^{\frac{1}{2}e^{-2y}}x\right) = -8e^{-2y}$$ hence $$e^{\frac{1}{2}e^{-2y}}x = 4e^{-2y}.$$ I don't see how you get to your expression.

share|cite|improve this answer
@TMM: Do I? We have $y' + 3y$; so we want an integrating factor $\mu$ such that $\mu y' + 3\mu y = (\mu y)' = \mu y' + \mu'y$. Hence we want $\mu' = 3\mu$; so the equation we want to solve is $\mu'=3\mu$, not $\mu' = -3\mu$... – Arturo Magidin Mar 24 '12 at 21:43
This is the solution I got for the first one (2/3)*(5+6x)-(22/3)/e^(3x) but as this is homework can someone just give me the answer so I cn make sure this is correct? – user979616 Mar 24 '12 at 21:50
@user979616: It is very easy to check if something is a correct solution to a differential equation: plug it into the equation! If you get equality, it's correct. If you don't get equality, there's something wrong. (Of course, plug in $x=0$ to see if you satisfy the initial condition). – Arturo Magidin Mar 24 '12 at 21:53
@TMM: That comes when you "solve for $y$". You end up with $e^{3x}y = \text{function of }x$, so when you solve for $y$ you end up with a negative exponent. Alternatively, you solve as you do in your answer (of course, that requires you to find some solution to this equation in the first place...) – Arturo Magidin Mar 24 '12 at 21:55
Well I checked my solution for number 1 and it seems valid but I think I made a bracketing error and the online system marked it wrong. Can someone work that one one to make sure that im right? – user979616 Mar 24 '12 at 22:03

For the equation $$\frac{dy}{dx} + 3y = 12x+19,\qquad y(0)=-4,$$ one finds a particular solution, by trying for something of the shape $y=ax+b$, and one adds the general solution of the homogeneous equation. Quickly we get to $y=Ce^{-3x}+4x+5$. The initial condition then gives $C=-9$.

For the equation $$\frac{dy}{dx}=(4x+9y)/3x\qquad y(1)=2,$$ I suggest making the substitution $y=wx$. We then get $$x\frac{dw}{dx}+w=\frac{4+9w}{3}$$ and then $$x\frac{dw}{dx}=\frac{4+6w}{3}.$$ This is a separable differential equation, which I assume you can handle comfortably.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.