Skip to content

Linear ODE with integrating factor x and y(1) = 1

Question

For x>0x>0, solve y′+yx=1x2y'+\dfrac{y}{x}=\dfrac{1}{x^2} subject to y(1)=1y(1)=1.

Short answer

y=1+ln⁡xxy=\dfrac{1+\ln x}{x}. Multiplying by the integrating factor xx turns the left side into (xy)′(xy)', so (xy)′=1/x(xy)'=1/x and xy=ln⁡x+Cxy=\ln x+C; y(1)=1y(1)=1 gives C=1C=1.

Adapted from Zhou, A Practical Guide to Quantitative Finance Interviews, sec. 3.5 Ordinary Differential Equations, 'First-order linear ODE', p.47; question and answer rewritten by SelfMadeQuant.com.

See the hint and the full worked solution in the question bank (free account).

Open the worked solution

Lessons behind this question