# Solve the differential equation $\frac{\mathrm{d}y}{\mathrm{d}x} = \cos(x+y) + \sin(x+y)$

Problem:

Solve the differential equation,$$\frac{\mathrm{d}y}{\mathrm{d}x} =\cos(x+y) + \sin(x+y)$$

My attempt at the problem:

$$\frac{\mathrm{d}y}{\mathrm{d}x} =\cos(x+y) + \sin(x+y)=\cos(x+y)\biggr(1+\tan(x+y)\biggr)$$

Now let, $$\cos(x+y)=u$$

So that,

$$\frac{\mathrm{d}y}{\mathrm{d}x} = u(1+\sqrt{\frac{1}{u^2}-1})$$ using $\tan^2A = \sec^2A - 1$

Also,

$$\frac{\mathrm{d}(\cos(x+y))}{\mathrm{d}x} = -\sin(x+y)\biggr(1 + \frac{\mathrm{d}y}{\mathrm{d}x} \biggr)$$

and $$\frac{\mathrm{d}u}{\mathrm{d}x} = -\sqrt{1-u^2}\biggr(1 + \frac{\mathrm{d}y}{\mathrm{d}x} \biggr)$$

Solving for $\frac{\mathrm{d}y}{\mathrm{d}x}$ and plugging it in the problem gives a very ugly integral upon separating variables

$$\int{\mathrm{d}x} = - \int \frac{\mathrm{d}u}{\biggr((u+1)+\sqrt{1-u^2}\biggr)\sqrt{1-u^2}}$$

I just can't solve it any further.

Please correct me if I'm wrong or please direct me towards an alternate solution. All help appreciated!

set $$x+y=u$$ then we have $$y=u-x$$ and $$y'=u'-1$$ and we have $$u'-1=\cos(u)+\sin(u)$$ Can you solve this?
• you have made $$\cos(x+y)=u$$ and i have Substitute $$x+y=u$$ there is a difference Dec 6, 2017 at 16:57
• @TobErnack The left-hand side is $u'-1$ and not $u'$, right? Dec 6, 2017 at 18:46
• @TobErnack Indeed, but the primitive actually looks simpler, since $\int 1/(1+\cos u+\sin u)\,du$ becomes $\ln(1+\tan(u/2))$ or something similar. Dec 6, 2017 at 19:46
• Since the only missing piece from the excellent answer of @Dr.SonnhardGraubner is the $t=\tan(u/2)$ substitution, I suggest that I do not add another answer with only that detail. Dec 7, 2017 at 6:28