# Thread: Calculating the integral of a logarithmic function

1. ## Calculating the integral of a logarithmic function

Hi guys,

I have a problem trying to calculate the integral of this function:
$ln(h/z)$
This function is part of a physics problem, where h is a constant that determines the height.
In the solutions, the integral is supposed to be $z ln(h/z) + z$

I know that the integral of ln(x) is x(ln(x)-1)
What I got from calculating this function with the formula is:
$(-z ln(z)+z)/h$
I don't understand how to get to the solution $z ln(h1/z) + z$

2. ## Re: Calculating the integral of a logarithmic function

Hey jojojo.

Hint - Try using integration by parts and isolate the constant with log laws.

3. ## Re: Calculating the integral of a logarithmic function

Hey chiro, thanks for the hint. I tried doing that and it keeps getting messier. I have $hln(z)^2/Z$.
If you could tell me exactly what the steps are it would be great

4. ## Re: Calculating the integral of a logarithmic function

The simplest thing to do is to write $\int ln(h/z)dz= \int ln(h)- ln(z) dz= z ln(y)- \int ln(z)dz$.
(That's the "log law" chiro is referring to.)

That last integral is given in every Calculus text. Use integration by parts taking u= ln(z) and dv= dz.

5. ## Re: Calculating the integral of a logarithmic function

I got it! Thank you so much it was so helpful