# Thread: Looking for a function f(x,a) such that f(a,a) = inf(f(x,a))

1. ## Looking for a function f(x,a) such that f(a,a) = inf(f(x,a))

Hi!

I've been at this all day and can't seem to find it...

I've got a function f(x) = 1/x + 1/(1-x)
Its minimum is x = 0.5 and f(x) = 4

The f(x) value doesn't really matter, but the function shape does, as it reaches infinity around 0 and 1. Hence, x is in ]0;1[

However, i'm trying to change the function so as to accept an "a" parameter, "a" being in ]0;1[ as well, such that the minimum isn't in x=0.5 but in x=a.
i.e.
inf(f(x,a)) = f(a,a)

I've been going for something like f(x,a) = a/x + 1/(1-x) but here "a" goes from 0+ to infinity...

Any ideas?

2. If I interpret your problem correctly you have
$f'=\ln x - \ln (1-x) = 0$ for x=0.5

and you want
$f'=\ln x - \ln (1-x) = 0$ for x=a

so choose:
$g'=\ln x - \ln (1-x) -f'(a)$

or
$g=\frac 1x + \frac 1{1-x}-(\ln a - \ln (1-a))*x$