MathTech

Solving Differential Equations

If a Differential Equation can be written in the form

\(\frac{dy}{dx}=f(x)\)

Solve by direct integration

E.G. \(\frac{dy}{dx}=x^2\)

\(\int\frac{dy}{dx}dx=\int x^2\,dx\)

\(y=\frac{x^3}{3}+C\)

If a Differential Equation can be written in the form

\(\frac{dy}{dx}=g(x)h(y)\)

Solve by separation of variables:

  1. divide by \(h(y)\) Integrate \(dx\)

  2. perform two integrations if possible. Obtain implicit form with 1 constant

  3. rearrange for y

E.G. \(\frac{dy}{dx}=x(1+y^2)\) where \(g(x)=x\) and \(h(y)=1+y^2\)

  1. divide by \((1+y^2)\)

\(\frac{1}{1+y^2}\frac{dy}{dx}=x\)

  1. Integrate dx

\(\int\frac{1}{1+y^2}\frac{dy}{dx}dx=\int x\,dx\)

  1. perform integrations

\(\arctan y=\frac{x^2}{2}+C\)

  1. rearange for y

\(y=\tan(\frac{x^2}{2}+C)\)

If a Differential Equation can be written in the form

\(\frac{dy}{dx}+g(x)y=h(x)\)

Solve by integrating factor:

\(p(x)=\exp(\int g(x)\,dx)\)

  1. determine integrating factor \(p(x)\)

  2. rewrite as \(\frac{d}{dx}(p(x)y)=p(x)h(x)\)

  3. integrate dx to get \(p(x)y=\int p(x)h(x)\,dx+C\)

  4. divide by \(p(x)\)

E.G. \(\frac{dy}{dx}=x-\frac{2xy}{x^2+1}\)

Write as

\(\frac{dy}{dx}+\frac{2xy}{x^2+1}=x (1)\)

\(g(x)=\frac{2x}{x^2+1}\, ,h(x)=x\)

  1. determine integrating factor

\(p(x)=exp(\int\frac{2x}{x^2+1}\,dx)\)