find the derivative of f(x)=tanx-4/secx

I used the quotient rule and got (sec^2x-4)(secx)-(tanx-4)(cosx)/sec^2x but I'm pretty sure that's wrong. Help. Thanks.

It is not clear what your expression really is, there are two possibilities. In both cases, it pays to do a little simplification before differentiating.

If f(x)=(tan(x)-4)/sec(x)
then
f(x)
=tan(x)*cos(x) - 4 cos(x)
=sin(x) - 4 cos(x)

f'(x) = cos(x) + 4 sin(x)

If f(x) = tan(x) - 4/sec(x)
then
f(x) = tan(x) - 4 cos(x)
f'(x) = sec2(x) + 4 sin(x)

cos(x) + 4 sin(x) is correct. How did the 4 end up with the sin and not with the cos?

It comes from

-4/sec(x) = -4 cos(x)
So when differentiated, it gives 4 sin(x)

To find the derivative of the function f(x) = tan(x) - 4/sec(x), we can use the quotient rule. Let's break it down step by step.

Step 1: Identify the numerator and denominator.
In this case, the numerator is tan(x) and the denominator is sec(x).

Step 2: Apply the quotient rule.
The quotient rule states that if you have a function of the form f(x) = g(x) / h(x), the derivative is given by [h(x) * g'(x) - g(x) * h'(x)] / [h(x)]^2.

Step 3: Calculate the derivatives of the numerator and the denominator.
The derivative of tan(x) is sec^2(x), and the derivative of sec(x) is sec(x) * tan(x).

Step 4: Plug everything into the quotient rule formula.
Applying the quotient rule, the derivative becomes:

[f'(x) * h(x) - g(x) * h'(x)] / [h(x)]^2
= [(sec^2(x) * sec(x)) - (tan(x) * sec(x) * tan(x))] / [sec^2(x)]^2.

Simplifying further, we have:

[sec^3(x) - tan^2(x) * sec(x)] / [sec^4(x)].

Therefore, the derivative of f(x) = tan(x) - 4/sec(x) is given by:

(sec^3(x) - tan^2(x) * sec(x)) / sec^4(x).

Please note that there might be alternative ways to simplify the expression further, depending on the context and your specific requirements.