We had a question which goes like this:
A particle is displaced from $(0,0)$ to $(1,1)$ along $\rm y=x$. The force $F$ on the particle is $\rm ( x^2 \hat j + y \hat i)$. Find Work done during displacement.
What I did:
$$\rm W = \int F\cdot dx$$
$$\rm = \int ( y \hat i + x^2 \hat j)\cdot( dx \hat i + dy \hat j)$$
$$\rm = \int (y \ dx + x^2 \ dy)$$
The problem is that we can't integrate with respect to one variable keeping other as constant because both variables change.
What to do in this case? Also can we put $y = x$ since it was moved along this path? Also if we were not given this condition, how we find the integral then?
Correct. As you mentioned in post and others mentioned in the comments, we can find the parameter $t$ which relates $y$ and $x$.
The particle was moved along $ x = y$, therefore this relation exists between all $ x$ and $\rm y$.
So we can replace $x$ with $y$ and vice versa, or replace both x and y with parameter $t$
$$ \therefore W = \int_{(0,0)}^{(1,1)}(x \ dx+y^2\ dy) = \frac{y^2}{2} + \frac{x^3}{3}\ \Big{|}^{(1,1)}_{(0,0)} = \frac{5}{6}$$
What if the particle wasn't moved along $ x= y$ ? How would we solve the integral:
$$ = \int (y \ dx + x^2 \ dy)$$
I think is the integral would have been unsolvable. The reason could be that the force $ F = (y \hat i + x^2 \hat j)$ is non conservative since $\nabla \times F \neq 0$. So work done would depend on curve along which particle was moved, and that path equation would need to be givenm