ODE exercise asked in the mathematics teacher group


Exercise:

Solve the following differential equation $\frac{dy}{dx}=\sin \left( x-y \right)$

Solution: Let $z=x-y\Leftrightarrow \frac{d}{dx}\left( z \right)=\frac{d}{dx}\left( x-y \right)\Leftrightarrow \frac{dz}{dx}=1-\frac{dy}{dx}\Leftrightarrow 1-\frac{dz}{dx}=\frac{dy}{dx}$

So $\frac{dy}{dx}=\sin \left( x-y \right)\Leftrightarrow 1-\frac{dz}{dx}=\sin z\Leftrightarrow \frac{dz}{dx}=1-\sin z\Leftrightarrow dz=\left( 1-\sin z \right)dx\Leftrightarrow \frac{dz}{1-\sin z}=dx$

$\Leftrightarrow \int{\frac{dz}{1-\sin z}=x+c\Leftrightarrow \int{\frac{1+\sin z}{\left( 1-\sin z \right)\left( 1+\sin z \right)}dz=x+c}}$

$\Leftrightarrow \int{\frac{1+\sin z}{1-{{\sin }^{2}}z}dz=x+c}\Leftrightarrow \int{\frac{1+\sin z}{{{\cos }^{2}}z}dz=x+c}$

$\Leftrightarrow \int{{{\sec }^{2}}z\,dz+\int{\frac{\sin z}{{{\cos }^{2}}z}dz=x+c}}\Leftrightarrow \int{d\left( \tan z \right)-\int{\frac{d\left( \cos z \right)}{{{\cos }^{2}}z}}}=x+c$

$\Leftrightarrow \tan z+\frac{1}{\cos z}=x+c\Leftrightarrow \tan z+\sec z=x+c$

Thus $\tan \left( x-y \right)+\sec \left( x-y \right)-x=c$

No comments:

Post a Comment