X over X+3 subtract X over X-3 = X^2 + 9 over X^2 -9

solve for x. show all work thank you

To solve the equation \( \frac{x}{x+3} - \frac{x}{x-3} = \frac{x^2 + 9}{x^2 - 9} \) for \( x \), follow these steps:

Step 1: Simplify the equation by finding a common denominator.
- The denominators in the fractions on the left side are \( x+3 \) and \( x-3 \), so the common denominator is \( (x+3)(x-3) \).
- Clear the fractions by multiplying both sides of the equation by \( (x+3)(x-3) \).
- After multiplying, you'll get \( (x-3)x - (x+3)x = (x^2 + 9) \).

Step 2: Simplify and expand the equation.
- Distribute the terms on the left side and combine like terms.
- \( x(x-3) - x(x+3) = x^2 + 9 \)
- \( x^2 - 3x - x^2 - 3x = x^2 + 9 \)
- \( -6x = x^2 + 9 \)

Step 3: Rearrange the equation in standard form.
- Subtract \( x^2 + 9 \) from both sides.
- \( x^2 + 9 + 6x = 0 \)

Step 4: Solve the quadratic equation.
- Rearrange the equation in descending order.
- \( x^2 + 6x + 9 = 0 \)
- To factorize, determine two numbers that multiply to give 9 and add up to 6. In this case, the numbers are 3 and 3.
- Rewrite the equation using the factored form.
- \( (x + 3)^2 = 0 \)
- Take the square root of both sides.
- \( x + 3 = 0 \)
- Subtract 3 from both sides.
- \( x = -3 \)

Therefore, the solution to the equation is \( x = -3 \).