Finding local max/min of a function I am having difficulty finding the local  maxima and minima on the function: $$f(x)=\frac{x^2}{x-a}$$  on  the invterval $(0, \infty)$.
so far I have worked out $$f'(x)=\frac{x(x-2a)}{(x-a)^2}$$  using the quotient rule.
I have also found the critical points $x=2a$ and $x=a$
I however am stuck after this point. I have tried to use the first derivative test to find out what values are local mins and local maxs, but I haven't attempted a problem where x  isn't a set value. While I understand a is a constant it isn't a set value and this confuses me as to how to use it in the first derivative test.
Note: It mentions the answer may invovle a parameter of a which makes me think the answer is dependent on a?
 A: Note that $a=0$ is special. Apart from not being defined at $0$, our function is then the same as the function $g(x)=x$, and has no local max or min.
We deal now with $a\gt 0$ and $a\lt 0$. I would deal with these separately.
Case $a\gt 0$: The derivative is $0$ at $x=0$ and at $x=2a$. We examine each of these points in turn. 
(i) The bottom of the derivative is safely positive. Consider the top $x(x-2a)$ very near $x=2a$. Note that $x$ is positive. For $x$ near $2a$ but smaller than $2a$, we see that $x-2a$ is negative. For $x\gt 2a$, it is positive. so the derivative is negative for $x$ smaller than $2a$, but near $2a$, and positive afterwards. Thus our function near $2a$ is going down and then up, we have a local minimum at $x=2a$.
(ii) We now look at the derivative near $x=0$. If $x\lt 0$, then $x$ is negative. Also, $x-2a$ is negative there, so the derivative is positive. For $x\gt 0$ but close to $0$, we have $x$ positive and $x-2a$ negative, so the derivative is negative. Thus near $x=0$ our function is going up and then down, we have a local max at $x=0$. But the problem only asks about the interval $(0,\infty)$, so we needn't have bothered. 
Case $a\lt 0$: We are only asked for local max and min in $(0,\infty)$. In the case $a\lt 0$ there are no critical points in $(0,\infty)$, so no local max or min. without that restriction, the analysis would go along lines similar to the case $a\gt 0$. 
A: Firstly, surely you mean that the critical points are $2a$ and $0$.
Secondly, you first have to understand what you have found when you computed the first derivative to understand what you need to do next.
The first derivative is the equation of the gradient of the curve. The critical points you have computed tallies with the points on the curve where the gradient is $0$.  
To test if it is a local minima/maxima, you can do one of two things:


*

*Do the second derivative test. That is to find the second derivative and substitute the critical point for $x$. If you have a positive result, then it is minimum, if negative, then it is a maximum.

*You can also try to do the following: Substitute $2a^+$ and $2a^-$ into the first derivative. (Think of $2a^+$ as $2a+0.1$ or $2a$ plus any small number you like. $2a^-$ would be $2a-0.1$ for example.)
Now bear in mind that we are looking at the gradient now at this point, so if we substitute $2a^+$, we have the following
$$f'(2a^+)=\frac{2a^+(2a^+-2a)}{2a^+-a}>0$$
because both the numerator and denominator are positive.
Now repeat for $2a^-$ and we can see that $f'(2a^-)<0$. So because the gradient is negative when approaching the critical point and positive when moving away, we can say that the critical point at $2a$ is minimal.


The second derivative test does the same thing but in a more concise manner. I thought you would be better off learning the principle first.
A: You have the function $f(x)=\frac{x^2}{x-a}$. Indeed, the first step is to take the derivative, which you correctly found to be 
$$
f'(x)=\frac{x(x-2a)}{(x-a)^2}
$$
But letting $f'(x)=0$ means that $x=2a$ or $x=0$. But $x=0$ isn't in your interval. Therefore, the only value to worry about is $x=2a$. Now if $x>2a$, notice that $f'(x)>0$ and if $x<2a$ that $f'(x)<0$. This means that $x=2a$ is a minimum for the function $f(x)$. So $f(x)$ has no maximum on the interval $(0,\infty)$. Indeed, $x^2$ grows much faster than $x-a$ (i.e., the limit as $x \to \infty$ for $f(x)$ is $\infty$). So there is no maximum and only $1$ minimum at $x=2a$ where $f(2a)=4a$.
EDIT: This assumes that $a>0$ of course. Otherwise, the value $x=2a$ isn't in your interval to begin with.
