On 2016-2-29 15:13, saad khalid wrote:
> r,theta,y =var("r,theta,y")
> x =r*cos(theta)
> f1 =x^2+y^2
> f1(x).diff(x)
> |
>
> I'm getting 2x as the output, when what I want is -2x. What am I doing
> wrong?
When you take the partial derivative of f1 with respect to x,
you hold y constant and ignore r.