Remember that the following steps are used when solving a maximum or minimum problem.

- Step 1: Find $f'(x)$ to obtain the gratest function.
- Step 2: Solve for $x$ where $f'(x)=0$ to find the values of $x$ where the maximum or minimum occur.
- Step 3: Apply the first derivative test to see if the point is a maximum or minimum.
- Step 4: Substitute the appropriate value of $x$ into $f(x)$ to obtain the maximum or minimum.

### Example 1

The population of a colony of ants rises and falls according to the breeding season. The population can be modelled by the equation $P(t) = 100\sin{\dfrac{\pi t}{4}}+4000$, where $t$ is the number of months since the beginning of the year.(a) Find the first time at which the population is greatest. (b) Find the maximum population.

**Note:**

Finding the derivatives of the funtions is not always the case. Sometimes, you can find cases that you do not have to differentiate the functions, but using the given domain and associated ranges will give better solutions. Let's take a look at the following Example 2 for a reference.