# Partial derivative of tan(x + y)

## Homework Statement

$$f(x, y) = \tan(x + y) \\ f_x = ?$$

## Homework Equations

$$\frac{dy}{dx}\tan(x)= \sec^2 x$$

## The Attempt at a Solution

I set y as constant, so I said derivative of y = 0 then took derivative of tan as above. However the answer should be
$$f_x = \sec^2(x + y)$$

Why is y included?

## Answers and Replies

tiny-tim
Science Advisor
Homework Helper
Hi username12345! $$f(x, y) = \tan(x + y) \\ f_x = ?$$

However the answer should be
$$f_x = \sec^2(x + y)$$

Why is y included?

Because it's in g(x,y) in the chain rule … ∂f(g(x,y))/∂x = ∂f(g(x,y))/∂g ∂g(x,y))/∂x

HallsofIvy
Science Advisor
Homework Helper
The fact that the derivative of y is 0 does not mean that y itself is 0 and replacing tan(x+y) with tan(x) is saying y= 0.

What is the derivative of tan(x+ a) for constant a?

What is the derivative of tan(x+ a) for constant a?

Well, what if you asked, what is derivative of $$tan(2x + a)$$... I would say $$2 \sec^2(2x + a)$$. So if that is correct then the derivative of $$\tan(x + a)$$ would be $$\sec^2(x + a)$$. Is this correct?

Now considering the partial derivative with respect to x, we want y as a constant so replace a with y and we get $$f_x = \sec^2(x + y)$$