Final answer:
To solve the differential equation dy/dx = x - 3/y with the initial condition y(2) = -5, we separated variables, integrated both sides, and used the initial condition to find the constant of integration. We determined the general solution to be y = ±√(x^2 - 6x + 7) and selected the negative solution to satisfy the initial condition.
Step-by-step explanation:
To solve for y as a function of x, given the differential equation dy/dx = x - 3/y with the initial condition y(2) = -5, we will use separation of variables and integration. We start by separating the variables y and x:
- Multiply both sides by y to get y dy = (x - 3) dx.
- Now, integrate both sides: ∫ y dy = ∫ (x - 3) dx.
- The left side integrates to y^2/2, and the right side integrates to x^2/2 - 3x + C, where C is the constant of integration.
- Therefore, our equation is y^2/2 = x^2/2 - 3x + C.
- Using the initial condition y(2) = -5, we can solve for C. Plugging in these values: (-5)^2/2 = 2^2/2 - 3(2) + C, which simplifies to C = 25/2 - 2 - 6 = 7/2.
- Thus, the equation becomes y^2/2 = x^2/2 - 3x + 7/2.
- To find y as a function of x, we take the square root of both sides, being mindful of the ± sign, as the square root has two solutions. So, y = ±√(x^2 - 6x + 7).
This is the general solution to the differential equation, but given that y(2) = -5 we only consider the negative square root, thus the particular solution for the function is y = -√(x^2 - 6x + 7).