Doug C. answered 12/03/25
Math Tutor with Reputation to make difficult concepts understandable
For f(x)=(cosx +3)tanx, let y = f(x) and take the natural log of both sides:
y = (cosx + 3)tanx
ln y = ln [(cosx + 3)tanx]
ln y = tanx ⋅ ln(cosx+3)
Now take the derivative of both sides using the product rule on the right:
1/y (y') = tanx [1/(cosx + 3)](-sinx) + ln(cosx+3) ⋅ sec2(x)
Simplify the right side a bit and multiply both sides by y:
y' = (cosx+3)tanx [-sin2x/(cos2x+ 3cosx) + sec2(x)ln(cosx + 3)]
This graph shows tangent lines to the original function at a sliding point of tangency (using the above derivative to determine the slope of the tangent line):
desmos.com/calculator/1zgdvy8qbh