# Finding Integrating factor

I have been solving this ODE

$$ydx+(y+\tan(x+y))dy=0$$

My approach was like this;

As this equation is not exact;

$$\frac{\partial}{\partial y}y = 1$$

$$\frac{\partial}{\partial x}(y+\tan(x+y)) = \sec^{2}(x+y)$$

We have to make this ODE an exact equation.

Thus, I thought that as there is $$\tan(x+y)$$, we cannot integrate both side of this equation(for there might be $$\log\mid\cos(x+y)\mid$$ form), I thought I might have to use the property of the trigometric function

$$\frac{d}{dx}\sin x = \cos x$$

$$\frac{d}{dx}\cos x = -\sin x$$

So I multiplied $$\cos (x+y)$$ at both side of this ODE and got

$$y\cos(x+y)dx + (y\cos(x+y) + \sin(x+y))dy = 0$$

Which is exact;

$$\frac{\partial}{\partial y}y\cos(x+y) = \cos(x+y) - y\sin(x+y)$$

$$\frac{\partial}{\partial x}(y\cos(x+y) + \sin(x+y)) = - y\sin(x+y)+\cos(x+y)$$

And with some more steps, I finally got answer

$$y\sin(x+y) = c$$

Where $$c$$ is constant.

But here's my question.

I tried to find out the integrating factor $$F(x,y)$$ which makes

$$Fydx+F(y+\tan(x+y))dy=0$$

an exact equation. This $$F(x,y)$$ should satisfy

$$y\frac{\partial F}{\partial y} + F = \frac{\partial F}{\partial x}(y+\tan(x+y))+F\sec^{2}(x+y)$$

But I cannot move forward form this step. I can assure that this $$F(x, y)$$ is exactly $$\cos(x+y)$$, but I don't know how to construct it or prove it.

Is there any help that I can find out integrating factor of this ODE?

Assume that you have an ode of the form $P(x,y)\text{d}x+Q(x,y)\text{d}y=0$ which is not exact.

We want to find an integrating factor of the form $\mu(x+y)$, i.e the equation $$\mu(x+y)P(x,y)\text{d}x+\mu(x+y)Q(x,y)\text{d}y=0$$ is exact. Define $\mu(x+y)P(x,y)=M(x,y),\mu(x+y)Q(x,y)=N(x,y)$.

The equation is exact, hence $M_y=N_x$, thus we have $$\mu'(x+y)P(x,y)+\mu(x+y)P_y=\mu'(x+y)Q(x,y)+\mu(x+y)Q_x$$Eventually $$\frac{\mu'(x+y)}{\mu(x+y)}=\frac{Q_x-P_y}{P(x,y)-Q(x,y)}$$

In your case, $Q_x=\sec^2(x+y),P_y=1$ and we get $$\frac{\mu'(x+y)}{\mu(x+y)}=\frac{\sec^2(x+y)-1}{-\tan(x+y)}=-\tan(x+y)\Longrightarrow \ln\left[\mu(x+y)\right]=\ln\left[\cos(x+y)\right]$$

Thus, the integrating factor is $\mu(x+y)=\cos(x+y)$.

The hint of finding an integrating factor that depends on $x+y$ is the function $Q(x,y)$.

You might want to try this and find integrating factor of the forms $\displaystyle \mu(xy),\mu\left(\frac{x}{y}\right)$, etc.