+3 votes
in Computer by kratos

Find the maximum value of the function f(x) = x + x^2 − x^3 for x ≥ 0

I'm trying to solve this problem but can't. Please help me...

1 Answer

+5 votes
by kratos
 
Best answer

Given f(x) = x + x^2 − x^3

Differentiating w r to x we get

f'(x) = d/dx(x + x^2 − x^3)=1+2x-3x^2

taking f'(x) = 0 we have

1+2x-3x^2=0

=> 1+3x-x-3x^2=0

=> (1+3x)-x(1+3x)=0

=> (1+3x)(1-x)=0

we are to take x>=0, So x = 1 is acceptable

Now f"(x) = x-6x

So for x=1 , f"(1) = 1-6=-5<0

Hence f(x) is maximum at x =1

Hence maximum value of f(x) = f(1)=1+1^2-1^3=1

...