Krista King Math | Online math help

View Original

How to solve boundary value problems with distinct real roots

Steps for solving a boundary value problem

We already know how to solve an initial value problem for a second-order homogeneous differential equation.

Boundary value problems are very similar, but differ in a few important ways.

  1. Initial value problems will always have a solution; boundary value problems may not.

  2. The initial conditions given in an initial value problem relate to the general solution and its derivative; the initial conditions in a boundary value problem both relate to the general solution, not its derivative.

  3. The initial conditions given in an initial value problem are both for values of ???x_0=0???; the initial conditions given in a boundary value problem are for ???x_0=a??? and ???x_0=b???.

Solving a boundary value problem with a second-order homogeneous differential equation


Take the course

Want to learn more about Differential Equations? I have a step-by-step course for that. :)


Solving a boundary value problem is very similar to solving an initial value problem

Example

Solve the boundary value problem with ???y(0)=1??? and ???y(2)=2???.

???y''-y=0???

If we make substitutions for ???y??? in terms of ???r???, we get

???r^2-1=0???

We’ll factor the left side and solve for ???r???.

???(r-1)(r+1)=0???

???r_1-1=0???

???r_1=1???

and

???r_2+1=0???

???r_2=-1???

The roots are two real numbers that are unequal (they’re not equal to each other), so these are distinct real roots. Which means we’ll use the formula for the general solution for distinct real roots and get

???y(x)=c_1e^{x}+c_2e^{-x}???

This is the general solution to the differential equation, but we still need to use our initial conditions to solve for ???c_1??? and ???c_2???, so we’ll plug each of them into the general solution separately.

???1=c_1e^{0}+c_2e^{-(0)}???

???1=c_1(1)+c_2(1)???

???1=c_1+c_2???

and

???2=c_1e^{2}+c_2e^{-(2)}???

???2=c_1e^{2}+c_2e^{-2}???

Solving the first equation for ???c_1??? gives ???c_1=1-c_2???. If we plug this into ???2=c_1e^{2}+c_2e^{-2}???, we get

???2=c_1e^{2}+c_2e^{-2}???

???2=(1-c_2)e^{2}+c_2e^{-2}???

Now we’ll solve this equation for ???c_2???.

???2=e^{2}-c_2e^{2}+c_2e^{-2}???

???2-e^{2}=-c_2e^{2}+c_2e^{-2}???

???2-e^{2}=c_2\left(-e^{2}+e^{-2}\right)???

???c_2=\frac{2-e^{2}}{-e^{2}+e^{-2}}???

Now we’ll use some algebra to simplify this value as much as we can.

???c_2=\frac{2-e^{2}}{e^{-2}-e^{2}}???

???c_2=\frac{2-e^{2}}{\frac{1}{e^2}-e^{2}}???

???c_2=\frac{2-e^{2}}{\frac{1}{e^2}-e^{2}\left(\frac{e^2}{e^2}\right)}???

???c_2=\frac{2-e^{2}}{\frac{1}{e^2}-\frac{e^4}{e^2}}???

???c_2=\frac{2-e^{2}}{\frac{1-e^4}{e^2}}???

???c_2=\left(2-e^{2}\right){\frac{e^2}{1-e^4}}???

???c_2=\frac{2e^2-e^4}{1-e^4}???

Plugging this value for ???c_2??? back into ???c_1=1-c_2???, we get

???c_1=1-c_2???

???c_1=1-\frac{2e^2-e^4}{1-e^4}???

And using algebra to simplify the value of ???c_1??? gives

???c_1=1\left(\frac{1-e^4}{1-e^4}\right)-\frac{2e^2-e^4}{1-e^4}???

???c_1=\frac{1-e^4}{1-e^4}-\frac{2e^2-e^4}{1-e^4}???

???c_1=\frac{1-e^4-2e^2+e^4}{1-e^4}???

???c_1=\frac{1-2e^2}{1-e^4}???

Now we can take the values we found for ???c_1??? and ???c_2??? and plug them into the general solution.

???y(x)=c_1e^{x}+c_2e^{-x}???

???y(x)=\frac{1-2e^2}{1-e^4}e^{x}+\frac{2e^2-e^4}{1-e^4}e^{-x}???


Get access to the complete Differential Equations course