Skip to main content

Coordinated Differential Equations

Section A.1 Brief review

Subsection A.1.1 Completing the Square

First, let’s focus on completing the square when the x2 coefficient is 1, i.e., a situation like x2+bx+c. The steps are as follows:
  • Take the x coefficient, cut it in half, and square it, so b turns to (b/2)2.
  • Add and subtract this new number (b/2)2 to the expression, after the x term but before the constant term, obtaining x2+bx+(b/2)2(b/2)2+c.
  • The first three terms can be factored as (x+b2)2. The constants at the end combine into a single term.

Example A.1.1.

Complete the square on the expression x2+5x+9.
We start by taking the x coefficient, 5, and cut it in half and square it, obtaining 254. We then add and subtract this term between the x term and the constant, obtaining
x2+5x+254254+9
The first three terms factor; in this case we take 5 and cut it in half, and that tells us what to add to x that is squared. We obtain
x2+5x+9=x2+5x+254254+9=(x+52)2+114
If the x2 coefficient is not equal to 1, we factor out the coefficient, complete the square of the part inside parenthesis as usual, and distribute the coefficient again.

Example A.1.2.

Complete the square on the expression 4t232t+10
The t2 coefficient is 4, so we factor it out and get 4(t216t+52); we then use the standard completing the square technique on t216t+52. The first step is adding and subtracting (162)2=64; doing this and factoring gives
t216t+52=t216t+6464+52=(t8)21232
Then we multiply this by 4 to obtain
4t232t+10=4((t8)21232)=4(t8)2246

Subsection A.1.2 Solving Quadratic Equations

There are various ways to solve quadratic functions. Factoring works when the roots are rational numbers. Graphing works if an approximate answer suffices. Completing the square and the quadratic formula will always work. The previous subsection details how to complete the square; here, we review the quadratic formula.
If one has a quadratic equation of the form ax2+bx+c, with a0, the solutions are given as
x=b±b24ac2a

Example A.1.3.

Solve the quadratic equation x24x=2
Rearranging this to equal zero gives x24x2=0, and we thus have a=1,b=4,c=2. The solutions are
x=(4)±(4)24(1)(2)2(1)=4±242=4±262=2±6
Sometimes there are no real solutions, but there are always complex solutions, as shown in the example below.

Example A.1.4.

Solve the quadratic equation 2x212x+27=0.
We have a=2,b=12,c=27; plugging this in the quadratic formula gives
x=12±1444(2)(27)2(2)=12±724
We can write
72=i72=62i
So
x=12±62i4=3±322i

Subsection A.1.3 Solving 2×2 linear systems

A 2×2 linear system is a set of equations of the form
a11x+a12y=b1a21x+a22y=b2
where a11,a12,a21,a22,b1, and b2 are constants, and x,y are variables to be solved for. A system can have one unique solution, no solutions, or infinitely many solutions.
There are many methods to solve systems of equations, but the most common ones (which will be reviewed here) are substitution and elimination. The first example below shows how to use substitution, and the second shows how to use elimination.

Example A.1.5.

Solve the following system of equations using substitution.
2x+3y=54x+2y=2
We can use either equation to solve for either variable; let’s use the first equation to solve for y. We get y=52x3. We then plug this into the second equation to obtain
4x+252x3=2
Simplifying the equation gives 163x+103=2; solving this yields x=14; plugging this into y=52x3 yields y=32.

Example A.1.6.

Solve the following system of equations using elimination.
3x+5y=22x+4y=3
We want to multiply each equation by something and add them together so that one variable cancels with itself. The x coefficients are 3 and 2; if we multiply the first equation by 2 and the second by 3 we get a 6x and a 6x which will cancel when added.
Doing this, the first equation becomes 2(3x+5y=2)6x10y=4 and the second equation becomes 3(2x+4y=3)6x+12y=9; adding these equations yields
6x10y+6x+12y=4+9
2y=5y=52
Then we can plug this into the equation 3x+5y=2 to get x=72 .
Sometimes a system will have infinitely many solutions, or none at all. The following examples show what happens when you try to solve them.

Example A.1.7.

Solve the system of equations
x2y=22x+4y=1
Using substiting, the first equation tells us that x=2+2y, and plugging this into the second equation gives 2(2+2y)+4y=1, which simplifies to 4=1. This obvious falsehood means there are no solutions.

Example A.1.8.

Solve the system of equations
2x+4y=63x+6y=9
If we try to eliminate the x variable, we can multiply the first equation by 3 and the second by 2, giving 6x12y=18 and 6x+12y=18; adding these together gives 0=0. This tells us there are infinitely many solutions; to find them, we can take either equation and solve for one of the variables. The first one gives x=32y, and this is the full set. (That is, to find a solution, you can let y be whatever you want, and then use x=32y to solve for x.)

Subsection A.1.4 Basic derivatives

Below is a chart showing derivatives of common functions; make sure you know these rules. You can also condier reviewing computing derivatives of sine and cosine functions
 1 
mathbooks.unl.edu
Table A.1.9. Table of basic derivatives
f(x) f(x)
c 0
cx c
xn nxn1
1x 1x2
x 12x
sin(x) cos(x)
cos(x) sin(x)
tan(x) sec2(x)
ex ex
ln(x) 1x
f(x)±g(x) f(x)±g(x)
cf(x) cf(x)
f(x)g(x) f(x)g(x)+f(x)g(x)
f(x)g(x) g(x)f(x)f(x)g(x)g(x)2
f(g(x)) f(g(x))g(x)
We can also take partial derivatives of functions of multiple variables, like 3x2+2y. Below are two examples of this.

Example A.1.10.

Compute x(3x2y2+sin(2xy))
The "x" part means we are taking the partial derivative with respect to x, treating y as a constant. The derivative of 3x2 is 6x, so the first term becomes 6xy2. Then the derivative of sin(2xy), treating x as a variable and y as a constant, is 2cos(2xy). The final answer is 6xy2+2cos(2xy).

Example A.1.11.

Compute y(x+yyxy4)
The "y" part means we are taking the derivative with respect to y, treating x as a constant, as if it were "2" or "π". The quotient rule on the first part means we have y(1)(x+y)(1)y2. Then since the derivative of y4 is 4y3, so the second term turns to 4xy3. The final answer is xy24xy3.

Subsection A.1.5 Basic integrals

Below is a chart showing integrals of common functions; make sure you know these rules. In differential equations, it is extra important that you remember the "+C" when taking integrals, since you will be finding solutions to differential equations that depend on the value of C.
Table A.1.12. Table of basic integrals
f(x) f(x)dx
a ax+C
xn,n1 xn+1n+1+C
1x ln|x|+C
sin(x) cos(x)+C
cos(x) sin(x)+C
1x2+1 arctan(x)+C
f(x)±g(x) f(x)dx±g(x)dx
cf(x) cf(x)dx

Subsection A.1.6 Integration by u-substitution

Integration by u-substition is the inverse of the chain rule for derivatives. What this does is changes the variables to make integration easier. Below are some examples.

Example A.1.13.

Compute ex(2ex+1)2dx
We want u to be something whose derivative appears (or has something similar to it appearing) elsewhere in the integral. Notice that the derivative of 2ex+1 is 2ex which is the same as the ex at the front, except there’s an extra factor of 2. Therefore u=2ex+1 is probably the best choice.
With this, we compute the derivative and write du=2exdx, and solving for dx gives dx=du2ex. Substiting our values of x and dx gives
ex(2ex+1)2dx=exu2du2exdx=u22du=u36+C
Substituting back in u=2ex+1 the final answer is
u33+C=(2ex+1)36+C

Example A.1.14.

Compute sin(x)cos(x)+1dx
We want u to be something whose derivative appears elsewhere in the expression. It looks like u=sin(x) and u=cos(x)+1 work in this regard, but it’s best not to have the derivative of u appear in the denominator of a fraction, so u=cos(x)+1 is probably a better choice. We then have du=sin(x)dx so dx=dusin(x). Therefore,
sin(x)cos(x)+1dx=sin(x)udusin(x)=1udu=ln|u|+C
=ln|cos(x)+1|+C
If we are asked to evaluate a definite integral, it is possible to do so entirely in the u-world without having to convert back to the x-world, as the examples below show.

Example A.1.15.

Compute π2/4π2sin(x)xdx
We substitute u=x, which gives du=12xdx so dx=2xdu. Also, the bounds of the integral go from x=π24 to x=π2; the substitution means the integral now goes from u=π2 to u=π. We therefore get
π2/4π2sin(x)xdx=π/2πsin(u)x2xdu=π/2π2sin(u)du
=2cos(π)+2cos(π2)=2

Example A.1.16.

Compute 37x12dx.
Substituting u=x12 we get du=dx2 so dx=2du. Also, this substitution turns the lower bound x=3 to u=312=1 and the upper bound x=7 to u=712=3. This gives us 37x12dx=13u2du=4333243132=4343

Subsection A.1.7 Integration by parts

Integration by parts is the reverse of the product rule; it is done via the formula
uv=uvvu
Here is a list of the order of preferences for the choice of u (e.g., if there is a logarithm in the integral, it is best to let u be the logarithmic function). The inverse trigonometric one is unlikely to show up in this course.
  • Logarithmic functions
  • Inverse trigonometric functions
  • polynomials and roots
  • trigonometric functions
  • exponential functions
Below are some examples of integrals solved using integration by parts.

Example A.1.17.

Compute (x+1)exdx
We do u=x+1,v=ex, which gives u=1,v=ex; the formula therefore says
(x+1)exdx=(x+1)exexdx=(x+1)exex+C=xex+C

Example A.1.18.

Compute e2xsin(x)dx
We do u=sin(x),v=e2x, which gives u=cos(x),v=e2x2, so
e2xsin(x)dx=sin(x)e2x2e2xcos(x)2dx
=sin(x)e2x212e2xcos(x)dx
We now have to calculate e2xcos(x)dx. Using integration by parts again, we have u=cos(x),v=e2x, so u=sin(x),v=e2x2, and we get
e2xcos(x)dx=cos(x)e2x2sin(x)e2x2dx
=cos(x)e2x2+12sin(x)e2xdx
It looks like we are back at square one, but this is actually helpful. We can write
e2xsin(x)dx=sin(x)e2x212(cos(x)e2x2+12sin(x)e2xdx)
=sin(x)e2x2cos(x)e2x414sin(x)e2xdx
If we denote I=e2xsin(x)dx, this equation can be written as
I=sin(x)e2x2cos(x)e2x414I
solving this equation for I yields
I=2sin(x)e2x5cos(x)e2x5+C

Example A.1.19.

Compute 12x2ln(x)dx
We do u=ln(x),v=x2, which gives us u=1x,v=x33, so this ends up being
ln(x)x33|1212x331xdx
=83ln(2)x39|12=83ln(2)79

Subsection A.1.8 Integration by partial fractions

For rational functions (i.e. a quotient of two polynomials), the easiest way to integrate is to rewrite the function as a sum of functions whose integrals are easier to compute. They are typically split into terms of the form ax+b or a(x+b)n. Below is a basic example.

Example A.1.20.

Compute 8x20x22x3dx
The denominator factors as (x3)(x+1), so we want to write this as 8x20x22x3=Ax3+Bx+1; multiplying both sides by (x3)(x+1) gives
8x20=A(x+1)+B(x3)
There are two ways to solve this; we can expand out the right-hand-side and equate like terms, or pick "smart" choices for x that help us solve. Both methods are useful in different situations, so I will show both.
If we multiply out the right side, we get Ax+A+Bx3B=(A+B)x+(A3B) which has to equal 8x20; equating coefficients gives A+B=8,A3B=20, and solving yields A=1,B=7.
Instead of multiplying out, we could have noted that plugging in x=1 into the equation eliminates the A variable, and we get 28=4B, so B=7, and plugging in x=3 gives 4=4A, so A=1. We then have
8x20x22x3dx=1x3+7x+1dx=ln|x3|+7ln|x+1|+C
Below is an example where we have to use a term of the form a(x+b)n, where n>1.

Example A.1.21.

Compute 3x2+3x+1x3+2x2+xdx
Factoring the denominator gives x3+2x2+x=x(x2+2x+1)=x(x+1)2. The partial fractions split-up will therefore be of the form Ax+Bx+1+C(x+1)2. Then we take the equation Ax+Bx+1+C(x+1)2=3x2+3x+1x3+2x2+x and multiply both sides by x(x+1)2, which yields
A(x+1)2+Bx(x+1)+Cx=3x2+3x+1
Plugging in x=0 gives A=1. Plugging in x=1 gives C=1, so C=1. Then plugging in x=1 gives 4A+2B+C=7, So 3+2B=7, so B=2. Therefore,
3x2+3x+1x3+2x2+xdx=1x+2x+11(x+1)2dx
=ln|x|+2ln|x+1|+1x+1+C
Below is an example where there we cannot factor the denominator into linear terms.

Example A.1.22.

Compute 4x25x+15x32x2+5xdx
The best we can factor the denominator is x32x2+5x=x(x22x+5). As x22x+5 does not factor, our backup plan is to complete the square with it, giving (x1)2+4. The partial fraction split-up is therefore
4x25x+15x32x2+5x=Ax+B(x1)+C(x1)2+4
Multiplying both sides by x((x1)2+4) gives
4x25x+15=A((x1)2+4)+Bx(x1)+Cx
Plugging in x=0 gives 15=5A, so A=3. Plugging in x=1 gives 4A+C=14; since A=3 this yields C=2. Finally, plugging in x=2 gives 21=5A+2B+2C, so B=1. Therefore,
4x25x+15x32x2+5xdx=3x+(x1)+2(x1)2+4dx
=3ln|x|+(x1)+2(x1)2+4
To evaluate that last integral, we split it into
x1(x1)2+4+2(x1)2+4.
The first term can be integrated by substituting u=(x1)2+4, and we get 12ln((x1)2+4). For the second term, recall that 1t2+1dt=arctan(t)+C. Since 4=22 we can substitute x1=2u and find the second term integrates to arctan(x12), so the final answer is
3ln|x|+12ln((x1)2+4)+arctan(x12)+C