# Find $f(x)$ when $-\frac{df(x)}{dx}\cdot\frac{x}{f(x)}=1$

I'm starting to take calculus in college (the first offered math class) and I was shown this problem. Find $f(x)$ when$$-\frac{df(x)}{dx}\cdot\frac{x}{f(x)}=1$$Rearranging this to make$$\frac{d\,f(x)}{dx}=-\frac{f(x)}{x}$$gives me an interesting relationship, and very strongly suggests to me a polynomial function, but I think this approach lacks rigor (since I can guess all I want what $f(x)$ is, but that's still heuristic reasoning since my brain can't exhaust all the possibilities).

Can someone walk me through a solution?

edit

This is not a homework problem, as my grade will not depend on its completion. But it's an interesting one. I've seen sorts of problems similar to this before, and they're all very unusual compared to what I've learned before.

-

Rearrange it like this

$$\frac{df}{f}=-\frac{dx}{x}$$

then integrate both sides each with respect to its variable. You're right, it is a polynomial...an easy one, I would say... =)

Edit: it is NOT a polynomial, as pointed out by Peter Tamaroff. My bad.

-
Oh wow, I didn't see the $\ln$ function. Cool. Thanks! – vitaminb12 Sep 26 '12 at 23:58
It is not a polynomial... – Pedro Tamaroff Sep 27 '12 at 0:06
$$\int\frac{df}{f}=-\int\frac{dx}{dx}$$$$\ln f(x)=-\ln(x)+c$$Solving for $f(x)$ here should be relatively easy. Did I miss something?**edit**Solving for $f(x)$ $$\frac{e^c}{x}=f(x)$$ – vitaminb12 Sep 27 '12 at 0:10
@vitaminb12 That is correct. – Pedro Tamaroff Sep 27 '12 at 0:23
You're damn right! I shouldn't say things late at night without carrying out all calculations... =) My bad – bartgol Sep 27 '12 at 0:26

Let us write $y=f(x)$. The trick is to notice that $$xy^{\prime} + y = (xy)^{\prime}$$ which is a reverse application of the product rule. Therefore $$\frac{d}{dx}(xy) = 0 \implies xf(x) = C$$ for some constant $C$. The general solution is then given by $$f(x) = \frac{C}{x}$$ There is a systematic method for attacking these problems and this specific equation is known as a linear first order differential equation. The above trick in particular generalizes into something called the integrating factor. A quick google search should provide more if you are interested. The study of these equations involving derivatives are generally called differential equations and the study of differential equations form a huge part of mathematics with applications in all branches of math/science.

-