Find the area of the region bounded by the curves $y =\sqrt x$, $y=x-6$ and the x-axis by integral with respect to x 
Find the area (in green) of the region bounded by the curves $f(x) =\sqrt x$,  $g(x)=x-6$ and the x-axis  by integral with respect to x
  

Attempt:
since $x-6 =\sqrt x$
$x=9$
$A = \displaystyle\int _a^b [f(x)-g(x)] dx$
$A = \displaystyle\int _0^9 \sqrt x -\int _0^9x-6$
$=\frac{2}{3}(9)^{\frac{3}{2}}-\left(\frac{1}{2}(9)^2-6(9)\right)  $
$=31.5$ $unit^2$
I don't think this method is correct since I am not getting the same area when I solve the integral with respect to y which is also different when I take the whole area under f(x) then subtract the area of the triangle on the right (base=3, height=3)
Can anyone help?
 A: Unfortunately, your integral grabs too much region.  It's more like this:

To get just the area of the green region, you would have to use two separate integrals.
$$
    A = \int_0^6 \sqrt{x}\,dx + \int_6^9\left(\sqrt{x} - (x-6)\right)\,dx
$$
Alternatively, you can integrate with respect to $y$.  The right edge can be expressed as $x=y+6$, the left as $x=y^2$, between $y=0$ and $y=3$.  So the area is
$$
    A = \int_0^3 (y+6 - y^2)\,dy
$$
I hope that helps.
A: This is wrong because by subtracting 
$$\int_0^9 x-6$$
you are adding the area from the blue line to the x axis (under the x axis) from 0 to 6. The correct way of doing this is subtracting the area of the triangle from 
$$\int_0^9 \sqrt{x}$$
A: First find the integral under $y=\sqrt x$ only:
$$\int_0^9\sqrt x\,dx=\left[\frac23x^{3/2}\right]_0^9=18$$
Now subtract the triangle's area (under $y=x-6$ with $6\le x\le9$), which is easily seen to be 4.5, and get 13.5 as the answer.
A: The second integral must be evaluated on the interval $[6,9]$ instead of $[0,9]$.
A: Alternatively, you can use
\begin{align} 
f^{-1}(y)&=y^2
,\\
g^{-1}(y)&=y+6
\end{align}  

and find the area as
\begin{align} 
\int_0^3 \int_{f^{-1}(y)}^{g^{-1}(y)} \,dx \,dy
&=\int_0^3 6+y-y^2\,dy
\\
&= \left. 6y+\tfrac12\,y^2-\tfrac13\,y^3\right|_0^3
\\
&=\frac{27}2
.
\end{align}  
