Answer:
see details in graph and below
Step-by-step explanation:
There are many ways to generate the function.
We'll generate a function whose first derivative f'(x) satisfies the required conditions, say, a quadratic.
1. f(x) has a local minimum at x = -3, and
2. a local maximum at x = 3
Therefore f'(x) has to cross the x-axis at x = -3 and x=+3.
Furthermore, f'(x) must be increasing at x=-3 and decreasing at x=+3.
f'(x) = -x^2+9
will satisfy the above conditions.
Finally f(x) must be decreasing at x= -5, which implies that f'(-5) must be negative.
Check: f'(-5) = -(-5)^2+9 = -25+9 = -16 < 0 so ok.
f(x) can then be obtained by integrating f'(x) :
f(x) = integral of -x^2+9 = -x^3/3 + 9x = 9x - x^3/3
A graph of f(x) is attached, and is found to satisfy all three conditions.