# Help tidying up a partial derivative?

Tags:
1. Oct 11, 2014

### physicsshiny

1. The problem statement, all variables and given/known data
Find $\frac{\partial f}{\partial x}$ if $f(x,y)=\cos(\frac{x}{y})$ and $y=sinx$

2. Relevant equations
See above

3. The attempt at a solution
For $\frac{\partial f}{\partial x}$ I calculated $$-\frac{1}{y}\sin(\frac{x}{y})$$ which comes out as $$\frac{-\sin(\frac{x}{\sin(x)})}{sinx}$$ and this looks really messy. Maybe I'm missing something really obvious or I made a silly mistake (or both), but it looks like this can be made to look neater. Any hints or tips on tidying this expression up would be much appreciated.

2. Oct 11, 2014

### RUber

Since y is a function of x, wouldn't the result be the full derivative of the function.

Last edited: Oct 11, 2014
3. Oct 11, 2014

### Dustinsfl

Did you use the chain rule correctly? Once you have negative sine, you need to take the derivative of the argument
$$\frac{f'g - g'f}{g^2}$$
where $f = x$ and $g = \sin(x)$.

Last edited: Oct 11, 2014
4. Oct 11, 2014

### Staff: Mentor

I think you meant "chain rule," not "change rule."

5. Oct 11, 2014

### Dustinsfl

Typo

6. Oct 11, 2014

### physicsshiny

Thanks for all advice - so $\frac{\sin(x)-x\cos(x)}{\sin^2(x)}$? Or its derivative? (Sorry. Feeling a lot more tired than when I made this post and thus more prone to misinterpret things.)

7. Oct 11, 2014

### Dustinsfl

Now you just need to multiple that by the sine term you obtained in post one and simplify.

8. Oct 12, 2014

### haruspex

Is this question right? Using the chain rule and involving y' is fine for df/dx, but it asks for the partial derivative of f(x, y), which means y does not change. The condition y = sin(x) then should be taken as a happenstance at the (x, y) of interest, not a general relationship. This means the OP solution is correct (but might as well leave it involving y, so less messy).
Perhaps more likely that df/dx was intended.

9. Oct 12, 2014

### physicsshiny

The question is right. It's on a problem sheet all about partial differentiation and asks for the partial derivative of f(x,y) with respect to x.

10. Oct 12, 2014

### Fredrik

Staff Emeritus
Then you got it right the first time. The question is weird, because the equation $y=\sin x$ has no relevance when you determine the function $\frac{\partial f}{\partial x}$. It's the map $(u,v)\mapsto -\frac{1}{v}\sin\frac{u}{v}$ with domain $\{(s,t)\in\mathbb R^2|t\neq 0\}$. The equation can be interpreted as suggesting that you should find the value of that function at $(x,\sin x)$ for an arbitrary $x\in\mathbb R$, but that makes me wonder why they're asking for $\frac{\partial f}{\partial x}$ (the function) rather than $\frac{\partial f(x,y)}{\partial x}$ (the number).

11. Oct 12, 2014

### physicsshiny

So there's no real way to tidy it up? And I agree, the question is strange, but that's what was written down.

Thanks once again for everyone's help, I really appreciate it.

12. Oct 12, 2014

### Dustinsfl

I still not so sure. When $y$ is written in this problem, it short hand for $y = f(x) = \sin(x)$. Since y = f(x), we can substitute this into the original equation which leads to
$$\cos\Big(\frac{x}{y}\Big) = \cos\Big(\frac{x}{f(x)}\Big) \Rightarrow \frac{\partial f}{\partial x}\cos\Big(\frac{x}{y}\Big) = -\sin\Big(\frac{x}{f(x)}\Big)\frac{f(x) - xf'(x)}{f^2(x)}$$
In an equation $f(x, y) = xy - x^2\sin(y)$, y would be treated as a number since it isn't a function of x. In the case posted, we have $f(x, y) = f(x, h(x))$ where I used h(x) so as not to confuse with f in the original question.

13. Oct 12, 2014

### Fredrik

Staff Emeritus
I think you're confusing the expression f(x,y) with the function f. The former represents a number. What number? That depends on the values of x and y. Since f is a function, the value of f(x,y) (the number represented by that notation) is completely determined by the values of x and y. So we say that f(x,y) is a function of x and y. (It's a function of something, but that doesn't make it a function).

The constraint y=sin x implies that the value of y is completely determined by the value of x. Because of this, we can say that f(x,y) is a function of x (and only x). Whenever an expression is a "function of" something, there's an actual function lurking in the background, in this case the function $x\mapsto f(x,y)=f(x,\sin x)$ with domain $\mathbb R$. The value of the derivative of this function at x is denoted by $\frac{d}{dx}f(x,\sin x)$. That's what you computed.
$$\frac{d}{dx}f(x,\sin x)=\lim_{h\to 0}\frac{f(x+h,\sin (x+h))-f(x,\sin x)}{h}.$$ However, $\frac{\partial f}{\partial x}$ is a notation for the function $D_1f$ defined by
$$D_1f(s,t)=\lim_{h\to 0}\frac{f(s+h,t)-f(s,t)}{h},$$ for all $s,t\in\mathbb R$. So we have
$$\frac{\partial f(x,\sin x)}{\partial x}=\lim_{h\to 0}\frac{f(x+h,\sin x)-f(x,\sin x)}{h}.$$ I think the terminology "partial derivative with respect to x" and accompanying notation $\frac{\partial f}{\partial x}$ is partially responsible for misunderstandings like this. It would be more accurate to talk about the partial derivative with respect to a variable slot, than with respect to a variable.