# Find the minimum of a function.

• Dec 11th 2012, 09:59 AM
Ant
Find the minimum of a function.
Hi,

I'm trying to find the minimum of the following function:

$f(x) = \frac{x^2}{2K} - ln(2cosh(x+h))$

My working so far:

$f'(x) = \frac{x}{K} - tanh(x+h) =0$

Where we set the derivative equal to zero as we're trying to find the min.

However, I'm not sure how to solve this equation, and find an expression for x. Is it best to rewrite the hyperbolic tan in terms of e?

Thanks!
• Dec 11th 2012, 10:38 AM
ebaines
Re: Find the minimum of a function.
I don't believe there is a closed form solution to the equation $x - C tanh(x) = 0$, so instead you should use a numerical technique to find a very good approximation for the value of x.
• Dec 11th 2012, 10:41 AM
Ant
Re: Find the minimum of a function.
hmm, Okay thanks.

I think I may just be able to define $x*$ as the min and carry on. (The full task is evaluating an integral using the laplace approx)