# Solve the equation in the following question

Solve the equation $$\sqrt{x+1}+\sqrt{2-x}+2=x^2+2x$$

I tried with squaring both sides, but I got confused, any help will be thankful.

• Why does this have the abstract-algebra tag? – Samir Khan Aug 12 '15 at 0:56
• @SamirKhan Sorry didn't see it clear – Rnas Aug 12 '15 at 0:59

You'll want just the terms with square roots on one side before you square both sides: $$\sqrt{x+1}+\sqrt{2-x}=x^2+2x -2$$
Squaring, then simplifying so that again only the terms with square roots are on the left, $$(x+1) + 2\sqrt{x+1}\sqrt{2-x} + (2-x) = x^4+4x^3-8x+4\\ 2\sqrt{x+1}\sqrt{2-x} = x^4+4x^3-8x+1\\$$
Squaring again, $$4(x+1)(2-x) = x^8+8x^7+16x^6-16x^5-62x^4+8x^3+64x^2-16x+1\\ x^8+8x^7+16x^6-16x^5-62x^4+8x^3+68x^2-20x-7=0$$
At this point I would throw my hands in the air and ask Wolfram Alpha, which tells me that there are four solutions; checking them in the original system, only one of them works: $x \approx 1.31295$.