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

This is one of my homework questions. I know it's not allowed but I can't seem to match my answer with the solution: You have to solve the initial value problem. $$xy' + y = 0,\quad y(4) = 6$$ My attempt: $$\frac{y'}{y} = \frac{-1}{x} = \int \frac{y'}{y} dx = \int \frac{-1}{x} dx = \int \frac{1}{y} dy = -\int \frac{1}{x} dx = ln(y) = -ln(x) + c$$

The solution they gave is $24/x$. I don't see how I can get to $24/x$ by substituting the initial values into that.

Where am I going wrong?

share|cite|improve this question
Hint: $\ln y = c - \ln x$ is equivalent to $y = d/x$. – Antonio Vargas Feb 15 '14 at 18:51
An fyi: Our site policy is that homework questions are allowed here -- All we ask is that the asker shows their work, of which you have done an excellent job. :) – apnorton Feb 15 '14 at 18:52
Thank you all. @Anorton, I assumed that the same no homework rule from some of the other stacks applied here. Sorry about that. – Hisham Feb 15 '14 at 19:09
up vote 2 down vote accepted

Your solution $$\ln y+\ln x=c \\ \ln xy=c \\ y(4)=6 \implies c=\ln 24 \\ \ln xy=\ln 24 \\ xy=24$$

share|cite|improve this answer
I wasted so much time on this. I got up to c = ln 24 on my own and then didn't know how to get from that to 24/x :/ Thank you very much for this. – Hisham Feb 15 '14 at 19:02
Note that the function $\ln$ is one to one so $\ln a=\ln b\implies a=b$. Glad to help out. – Sameh Shenawy Feb 15 '14 at 19:08

From $\ln y=-\ln x +C$, we get, by exponentiating, $y=e^C x^{-1}$. Put $x=4$. Then $y=6$ and therefore $e^C=24$.

Detail: We have $e^{\ln y}=y$ and $e^{-\ln x}=(e^{\ln x})^{-1}=x^{-1}$.

Remark: It would have been easier to note that $x\frac{dy}{dx}+y$ is the derivative of $xy$. Thus $$\frac{d(xy)}{dx}=0,$$ and therefore $xy=D$ for some constant $D$. it follows that $y=\frac{D}{x}$.

share|cite|improve this answer
Thank you André. The only reason I marked Semsem's answer is because I found it easier to understand and closer to the steps I was taking. Thanks again. – Hisham Feb 15 '14 at 19:06
You are welcome. I myself prefer to "substitute immediately," before solving for $y$, so I prefer Semsem's path to my $e^C$ path. I have found, however, that students tend to prefer the $E^C$ path. You have good taste! – André Nicolas Feb 15 '14 at 19:09

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.