# Please tell me what I did wrong when solving this DE

• asdfghhjkl
In summary, the conversation is about solving a simple differential equation and the mistake that was made in the solution process. The correct solution is also provided.

#### asdfghhjkl

Hello everyone,

I have a brief question. I am trying to solve the following simple differential equation:
$x\dfrac{dy}{dx}= y^2-1$
I manage to solve it one way, but when I try to solve it in the following way, I cannot get the correct answer. I would really appreciate if someone could point out my mistake :)

$\dfrac{dy}{y^2-1}= \dfrac{dx}{x}$
Rewriting the fraction on the left as the sum of two fractions
$\dfrac{1}{2}(\dfrac{-1}{y+1}+\dfrac{1}{y-1})dy= \dfrac{dx}{x}$
Integrating both sides:
$\dfrac{1}{2}∫(\dfrac{-1}{y+1}+\dfrac{1}{y-1})dy= ∫\dfrac{dx}{x}$
$\dfrac{1}{2}∫(-1ln(y+1)+ln (y-1))dy= ln(x)+c$
$\dfrac{1}{2} ln(\dfrac{y-1}{y+1})= ln(x)+c$
It is given that when x=1, y=0, thus c=0
$\dfrac{1}{2} ln(\dfrac{y-1}{y+1})= ln(x)$
$\dfrac{y-1}{y+1}= x^2$
Which gives:
$y= \dfrac{1+x^2}{1-x^2}$
But, he correct result is:
$y= \dfrac{1-x^2}{1+x^2}$

I would really appreciate if anyone could point out the mistake. Thank you. :)

Hi asdfghhjkl

Welcome to Physicsforums !

$\dfrac{y-1}{y+1}= x^2$ should be $\dfrac{|y-1|}{|y+1|}= x^2$

and this will give you $\dfrac{1-y}{y+1}= x^2$ .You can check that from the initial conditions.

Remember ∫(1/x)dx =ln|x|.

Oh, I see thank you very much for your help :)

## 1. What is a differential equation?

A differential equation is a mathematical equation that describes the relationship between a function and one or more of its derivatives. It is often used to model natural phenomena in physics, engineering, and other fields.

## 2. How do I solve a differential equation?

Solving a differential equation involves finding a function that satisfies the equation. This can be done analytically, using mathematical techniques such as separation of variables or the method of undetermined coefficients, or numerically, using computational methods like Euler's method or Runge-Kutta methods.

## 3. What are the common mistakes made when solving differential equations?

Some common mistakes when solving differential equations include incorrect application of mathematical techniques, errors in algebraic manipulation, and mistaking boundary conditions for initial conditions. It is important to carefully check each step of the solution process to avoid these mistakes.

## 4. How do I know if my solution to a differential equation is correct?

The best way to check the correctness of a solution to a differential equation is to substitute it back into the original equation and see if it satisfies it. Additionally, you can compare your solution to known solutions or use computational methods to approximate the solution and compare the results.

## 5. What resources are available to help me with solving differential equations?

There are many resources available to help with solving differential equations, including textbooks, online tutorials, and software programs. You can also seek help from a math tutor or consult with a colleague or professor for guidance. It is important to practice and review regularly to improve your skills in solving differential equations.