IVP Separable Equation where given answer not correct?

35 Views Asked by At

So I'm working on the following problem:

$$ \frac{dy}{dx} = \frac{1+y^2}{1+x^2}, y=1, x=0 $$

To me this appears as a separable first order differential equation, so I separate it into g(x) and h(y) as follows: $$ \frac{dy}{dx} = \frac{1+y^2}{1+x^2}=\frac{1+y^2}{1}\frac{1}{1+x^2} $$ and this allows us to use the general solution of: $$ \int\frac{dy}{h(y)} = \int g(x)dx + c $$ which in my example results in: $$ \int\frac{dy}{1+y^2} = \int \frac{1}{1+x^2}dx + c $$ Which straight away we can apply the basic integral for arctan: $$ arctan(y) = arctan(x) + c $$ At this point I multiplied both sides by tan to get y = f(x). From there working out c is just a matter of substituting our original values for x and y, I believe. I'll go no further at this point as I've done much of this on paper, but no matter what I try, I cannot arrive at the solution given in the notes.

The answer given in the notes is: $$ y=\frac{1+x}{1-x} $$ At this point I also tried plugging the equation into some online calculators, and they arrived at a similar solution, this being wolframs answer: $$ y(x) = tan(arctan(x) + π/4) $$

I'd be very thankful if someone could poke me in the right direction on this one, are the two answers somehow equivalent, or have a made a foolish error? Regardless, thanks for your help.

2

There are 2 best solutions below

7
On BEST ANSWER

$$ \tan(a+b) = \frac{\tan a + \tan b}{1-\tan a\cdot\tan b}. $$

4
On

Hint. When you multiplied both sides by $\tan{},$ what happened to the constant?