# Maximum value of a function

## Homework Statement

f(x) = 1/(1+|x|) + 1/(1+|x-a|), a>0

I am to show that the maximum value of this function is (2+a)/(1+a).

## Homework Equations

None in particular. Derivatives for 1/x and the chain rule for f(g(x)).

## The Attempt at a Solution

I have parted this function according to 0 <= x, 0 <= x <= a, a <= x, and differentiated and confirmed via Wolfram Alpha.

The first derivative has no root for 0 <= x and a <= x, and for 0 <= x <= a I get the value x = a/2, which yields f(a/2) = 0, which is obviously a minimum and not a maximum.

Related Calculus and Beyond Homework Help News on Phys.org
Ray Vickson
Homework Helper
Dearly Missed

## Homework Statement

f(x) = 1/(1+|x|) + 1/(1+|x-a|), a>0

I am to show that the maximum value of this function is (2+a)/(1+a).

## Homework Equations

None in particular. Derivatives for 1/x and the chain rule for f(g(x)).

## The Attempt at a Solution

I have parted this function according to 0 <= x, 0 <= x <= a, a <= x, and differentiated and confirmed via Wolfram Alpha.

The first derivative has no root for 0 <= x and a <= x, and for 0 <= x <= a I get the value x = a/2, which yields f(a/2) = 0, which is obviously a minimum and not a maximum.
OK, so what are these facts telling you?

RUber
Homework Helper
f(x) = 1/(1+|x|) + 1/(1+|x-a|), a>0
I get the value x = a/2, which yields f(a/2) = 0, which is obviously a minimum and not a maximum.
Double check your evaluation at x=a/2. It seems like you took the right approach. Also, don't hesitate to plot the function with an arbitrary value a.