# Solve the initial value problem \frac{dy}{dx} = \frac{1}{x^2} - x ; \quad x\gt 0, y(4) =2

## Question:

Solve the initial value problem {eq}\frac{dy}{dx} = \frac{1}{x^2} - x ; \quad x\gt 0, y(4) =2 {/eq}

## Initial Value Problem in Calculus:

To solve this problem we'll integrate both sides since integration is a process of finding a function when it's derivative is given is called anti-differentiation.

An initial value problem is also called a Cauchy problem. The solution of the problem always satisfies the initial value.

We are given:

{eq}\frac{dy}{dx} = \frac{1}{x^2} - x {/eq}

{eq}\Rightarrow \ dy = (\frac{1}{x^2} - x ) \ dx {/eq}

Integrate both sides:

{eq}\Rightarrow \int 1 \ dy =\int (\frac{1}{x^2} - x ) \ dx {/eq}

{eq}\Rightarrow \int 1 \ dy =\int x^{-2} \ dx -\int x \ dx {/eq}

{eq}\Rightarrow y =\dfrac{ x^{-1}}{-1} -\dfrac{x^2}{2} {/eq}

{eq}\Rightarrow y =- \dfrac{ 1}{x} -\dfrac{x^2}{2} +c_{1} {/eq}

Plug in the initial condition:

{eq}2 =- \dfrac{ 1}{4} -\dfrac{16}{2} +c_{1} \Rightarrow c_{1}= 2+ \dfrac{ 1}{4}+8 \Rightarrow c_{1}= \dfrac{ 41}{4} {/eq}

Therefore the solution is:

{eq}\Rightarrow y(x) =- \dfrac{ 1}{x} -\dfrac{x^2}{2} + \dfrac{ 41}{4} {/eq}