# Solving Initial Value Problems (IVPs)

fact
As we've covered before, a differential equation by itself is only a solution up to a constant, an infinite number of equations will solve a single differential equation. But in the real world we usually want THE solution to a problem. We use a second piece of information, the value of the solution at a given point, to allow us to solve for this constant.
fact
Given some differential equation and some point on the solution's curve we first solve the differential equation as we have been, then plug the solution point into our solution expression to solve for the constant.
example

Solve the IVP $$y' = x,\quad y(0) = 5$$

Here we see that we want to solve the differential equation $$y' = x$$ which we know has an infinite number of solutions. But since none of them cross each other there is only one solution that passes through the point (0, 5) as our extra value states. First we solve $$y' = x$$ by noting it is a separable ODE: $$dy = xdx \implies y = \frac{1}{2}x^2 + c$$ Now we plug in $$y(0) = 5$$ and solve for $$c$$: 5 = $$\frac{1}{2}0^2 + c \implies c = 5$$ So $$y = \frac{1}{2}x^2 + 5$$ It's that simple.
example

Solve the IVP $$2xy' + 4y = 3,\quad y(1) = -1$$

This is a linear ODE so placing it in standard form: $$y' + \frac{2}{x}y = \frac{3}{2x}$$ $$p(x) = \frac{2}{x}$$ and $$g(x) = \frac{3}{2x}$$ $$\mu = e^{\int \frac{2}{x}dx} = x^2$$ $$y = x^{-2}(\int x^2\frac{3}{2x} dx + c)$$ $$y = x^{-2}(\int \frac{3x}{2} dx + c)$$ $$y = \frac{3}{4} + \frac{c}{x^2}$$ Now plugging in $$y(1) = -1$$: $$-1 = \frac{3}{4} + \frac{c}{1} \implies c = -\frac{7}{4}$$ So $$y = \frac{3}{4} - \frac{7}{4x^2}$$
fact
When solving higher order differential equations we need points not just on the solution's curve, but its derivatives as well. If we wanted to solve $$y'' + 2y' + 5 = 0$$ we would need a point on the $$y$$ curve and a point on the $$y'$$ curve. Like $$y(0) = 5,\quad y'(1) = 10$$
practice problems