# Give an example of a function, f(x), that has a local maximum at (-3,3) and a local minimum at (3,-3)

*print*Print*list*Cite

We'll consider a function of 3rd order, at least (a quadratic has a single local extreme, either maximum, or minimum).

We'll consider the function of 3rd order.

f(x) = ax^3 + bx^2 + cx + d

If the function has a local maximum at (-3,3), it means that the x coordinate of the local maximum represents the critical value of function, also it is the zero of the first derivative of the function.

f'(x) = 3ax^2 + 2bx + c

f'(-3) = 27a - 6b + c

But f'(-3)=0 => 27a - 6b + c = 0 (1)

We'll compute f(-3)=3.

f(-3) = -27a + 9b - 3c + d

-27a + 9b - 3c + d = 3 (2)

f'(3) = 0 <=> 27a + 6b + c = 0 (3)

f(3) = -3 <=> 27a + 9b + 3c + d = -3 (4)

We'll equate (1)=(3):

27a - 6b + c = 27a + 6b + c

We'll eliminate like terms:

-12b = 0 => b = 0

We'll add (2) + (4):

-27a + 9b - 3c + d + 27a + 9b + 3c + d = 3 - 3

We'll substitute b by 0 and we'll eliminate like terms:

2d = 0

d = 0

We'll substitute b and d by 0 in 27a + 9b + 3c + d = -3

27a + 3c = -3

We'll divide by 3:

9a + c = -1 (5)

Since 27a + 6b + c = 0 and b = 0 => 27a = -c => 9a = -c/3 (6)

We'll replace 9a by (6):

-c/3 + c = -1

-c + 3c = -3

2c = -3

c = -3/2

9a = 3/2*3

9a = 1/2

a = 1/18

**The required function, that has local maximum at (-3 , 3) and a local minimum at (3 , -3), is: g(x) = x^3/18 - 3x/2.**