find d^2y/dx^2 (second derivative) for y=cos^2 4x

y'=-8sin(4x)cos(4x)

y"=-8[sin(4x)(-sin(4x))*4+cos(4x)(cos(4x))*4]
y"=-8[-4sin^2(4x)+4cos^2(4x)]
y"=-32[cos^2(4x)-sin^2(4x)]

y=cos^2 4x

y'=2cos 4x * -sin 4x*4= -8cos4x*sin4x
= -4sin(8x)
y"= -4cos(8x)(8)=-32 cos(8x)
y"'=+32*8 sin(8x)
y""=32*64*cos(8x)

check my work

how did you get -4sin8x from -8cos4x*sin4x?

The answer is -32(cos^2 4x-sin^2 4x) but not sure how to get there

To find the second derivative of y = cos^2(4x), we need to differentiate the function twice with respect to x.

Step 1: Find the first derivative (dy/dx).
To differentiate y = cos^2(4x), we can use the chain rule. The chain rule states that if we have a composite function, such as f(g(x)), the derivative of f(g(x)) with respect to x is given by f'(g(x)) multiplied by g'(x).

Here is how we apply the chain rule to find dy/dx:
1. Start by differentiating the outer function (cos^2(u)), treating u as the inner function.
2. The derivative of cos^2(u) is -2cos(u)sin(u) (using the chain rule).
3. Replace u with 4x in the result, as u = 4x based on the original equation.
So, dy/dx = -2cos(4x)sin(4x)

Step 2: Find the second derivative (d^2y/dx^2).
To find the second derivative, we differentiate dy/dx (which we just found) with respect to x.
Here is how we differentiate dy/dx = -2cos(4x)sin(4x) with respect to x:
1. Apply the product rule, which states that if we have two functions f(x) and g(x) whose derivatives exist, the derivative of f(x)g(x) is given by f'(x)g(x) + f(x)g'(x).
Let f(x) = -2cos(4x) and g(x) = sin(4x).
2. Differentiate f(x) = -2cos(4x):
The derivative of cos(4x) is -sin(4x), and applying the chain rule, the derivative of -2cos(4x) is -2(-sin(4x))(4) = 8sin(4x).
3. Differentiate g(x) = sin(4x):
The derivative of sin(4x) is 4cos(4x), applying the chain rule.
4. Substitute these results into the product rule:
dy/dx = f'(x)g(x) + f(x)g'(x) = (8sin(4x))(sin(4x)) + (-2cos(4x))(4cos(4x))
5. Simplify the expression:
d^2y/dx^2 = 16sin^2(4x) - 8cos^2(4x)

So, the second derivative of y = cos^2(4x) is d^2y/dx^2 = 16sin^2(4x) - 8cos^2(4x).