back to *trigonometry video lessons*
# Find the maximum value of a trigonometry function

Question:

Given: f(x) = sin^{2}x - cos^{2}x + 2 sin x cos x. What is the value of x in which f(x) having a maximum value and what is the maximum value?

Solution:

We are going to use these formulas:

- cos 2x = cos
^{2}x - sin^{2}x - sin 2x = 2 sin x cos x

- f(x) = sin
^{2}x - cos^{2}x + 2 sin x cos x - = 2 sin x cos x - (cos
^{2}x - sin^{2}x) - = sin 2x - cos 2x
- = (2/square root of 2) [sin2x (square root of 2/2) - cos2x (square root of 2/2)]
- = (square root of 2) [sin2x cos(pi/4) - cos2x sin(pi/4)]

- note:
- 2/square root of 2 = (square root of 2)
^{2}/(square root of 2) = square root of 2 - cos pi/4 = square root of 2/2
- sin pi/4 = square root of 2/2

We are going to use the formula:

- sin (a - b) = sin a cos b - cos a sin b
- f(x) = (square root of 2) sin (2x - pi/4)

When 2x - pi/4 = pi/2 + 2pi k (k is integer), f(x) has a maximum value that is square root of 2.

- solve the equation to find the value of x,
- 2x - pi/4 = pi/2 + 2pi k
- 2x = pi/4 + pi/2 + 2pi k
- 2x = 3pi/4 + 2pi k
- x = 3pi/8 + k pi

Therefore, when x = 3pi/8 + k pi, f(x) has maximum value that is square root of 2. When k = 0, x = 3pi/8 = 1.2, f(x) has the maximum value that is square root of 2. When k = 1, x = 3pi/8 + 1 × pi = 3pi/8 + pi = 11pi/8 = 4.3, f(x) has the maximum value that is square root of 2. Please watch the video for more details.