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.


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

  • $\begingroup$ I'm sorry, but I don't understand how I can apply this to my result. $\endgroup$ – William Slater Oct 6 '19 at 15:19
  • $\begingroup$ Oh wait, maybe I do, one moment. $\endgroup$ – William Slater Oct 6 '19 at 15:21
  • $\begingroup$ You are suggesting that $tan(arctan(y)) = \frac{tan(arctan(x) + tan(c))}{1-tan(arctan(x)) + tan(c)}$? $\endgroup$ – William Slater Oct 6 '19 at 15:26
  • $\begingroup$ No. You have $\arctan(y) = \arctan(x)+\arctan(1)$. Now, apply $\tan$ on both sides and use the formula for the right-hand side. $\endgroup$ – amsmath Oct 6 '19 at 15:29
  • $\begingroup$ Thanks. I think that is what I have put but not simplified or substituted 1 for c. But I understand. Thank you again. $\endgroup$ – William Slater Oct 6 '19 at 15:32

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

  • $\begingroup$ This resulted in $y=tan(arctan(x)+c)$, which I cannot further simplify, (save to $x+tan(c)$ I believe. $\endgroup$ – William Slater Oct 6 '19 at 15:17
  • $\begingroup$ @WilliamSlater No, it doesn't simplify to that. I believe you now know what it simplifies to since someone above has shown you how to resolve the tangent of a sum. $\endgroup$ – Allawonder Oct 6 '19 at 16:32
  • $\begingroup$ How do you multiply with a function (not with a function value?) You can apply or compose functions, perhaps also concatenate or (en-)chain. $\endgroup$ – Lutz Lehmann Oct 6 '19 at 16:45
  • $\begingroup$ @LutzL Use your favourite language. I went with OP's language because it's also right -- even though they might not have thought of it they way I did. $\endgroup$ – Allawonder Oct 6 '19 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.