Change of variable in differential equation legitimate? Just a general question ( I don't want to solve this ODE, I just want to understand why this is legitimate to do or not):
Assuming we have the ODE $$y'(x) - \cos(x) y(x)=0$$ on $[0,2\pi]$
Am I allowed to make the substitution $z = \cos(x)$?  This substitution is definitely not a diffeomorphism, as $\cos$ is not injective on $[0,2\pi]$, but is there a work-around to make this rigorous? What would be the consequences of making such a substitution in general?

It is a diffeomorphism from $(0,\pi)$ to $(-1,1)$. Do your computations, and when you finish, check that the solution is valid everywhere.
