# Another algebra and trig question (maybe not though)

1. Mar 17, 2006

I have $u(r,\theta)=r \cos \theta + r^{-1}\cos \theta$ and then am changing coordinates $u(x,y)=|x|+\frac{|x|}{x^2+y^2}$. I then have to compute the vector $\vec v = (u_x,u_y)$.

The thing is, is the derivative of $|x|$ is $sign\,\,x$. I don't think we should be dealing with this function. So I'm not sure how I should be dropping the absolute value to get to: $u(x,y)=x+\frac{x}{x^2+y^2}$.

I'm thinking it is from the conversion to polar to cartesian... but I'm not sure. Maybe it is within the definition of $\tan^{-1}$... but again I'm not sure. Well I'm sick of throwing random darts, so if anyone has any suggestions, I'm all ears :)
Please note that $u(x,y)$ was my conversion from polar coordiantes to cartesian, so this could also be a problem, and might be incorrect.

Thankyou.

Last edited: Mar 17, 2006
2. Mar 17, 2006

### Integral

Staff Emeritus
Consider the polar point (1, $\pi$) this should be the same as (-1,0) in Cartesian coordinates.

These points should yield the same result for your function. Do they?

Consider your rectangular function both with and without the abs, which gives the correct result?

3. Mar 17, 2006

### benorin

Consider that $u(r,\theta)=r \cos \theta + r^{-1}\cos \theta = r \cos \theta + \frac{r\cos \theta}{r^2}$ and you can get it from there, correct?

4. Mar 18, 2006

$$u_{polar}(1,\pi) = \cos \pi + \cos \pi =-2$$
$$u_{cart}(-1,0) = |-1| + \frac{|-1|}{1}=2 \neq -2$$