







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
9 Exact solutions to differential equations. This unit covers Sections 7.2 and 9.1–9.2 of the textbook. It concerns mainly tech- niques of computation.
Typology: Lecture notes
1 / 13
This page cannot be seen from the preview
Don't miss anything!
This unit covers Sections 7.2 and 9.1–9.2 of the textbook. It concerns mainly tech- niques of computation. For each of the three class days I will give a short lecture on the technique and you will spend the rest of the class period going through it yourselves.
Exactly solving differential equations is like finding tricky integrals. You have to recognize the equation as a type for which you know a trick, then apply the trick. You will learn precisely two tricks. The first works for a class of equations called separable equations. The trick involves getting all the x variables on one side of the equation and the y variables on the other (hence the name “separable”). The second class is the class of linear first order equations. The trick there will be to find a so-called integrating factor. Before learning either of these tricks, we’ll spend a day getting familiar with the easiest but single most important differential equation. This one is bother separable and linear.
The single most important differential equation is, as luck would have it, very easy to solve: dy dx
= ky (9.1)
where k is a constant. You can solve it by guessing the answer but let’s solve it a way that will generalize.
Step 1: Separate. To get the dependent variables on the left and the independent variables on the right, we divide both side by y and multiply both sides by dx:
dy y
= k dx. (9.2)
If you are worried about whether it’s OK to multiply dy/dx by dx, you’re right to be concerned, because a dy without a /dx is meaningless, but it works anyway and we’ll show you why later.
Step 2: Integrate. The integral of dy/y is ln |y|. What’s the integral of k. You might think it’s 1/ 2 k 2 but it’s not. Pay attention to the variable of integration, which is dx.
The integral of k dx is just kx. So now (don’t forget the constant) we have
ln |y| = kx + C. (9.3)
Step 3: exponentiate both sides to get
|y| = e kx+C^ = e C^ e kx^. (9.4)
Step 4: The constant e C^ can be any positive real number. If the absolute value of y can be any positive multiple of e kx^ that’s the same as saying y can be any multiple of e kx^ positive or negative. Call this multiple C 1. We write the solution in its final form: y = C 1 e kx^ (9.5)
where C 1 can be ay real number.
Note: A lot of people like to call the new constant C 1 the same name as the old constant and write y(x) = Ce kx^ , where C is any real number. This is a correct solution, but we don’t want you changing the value of C midstream if it leads to writing incorrect equations such as e C^ e kx^ = Ce kx^.
In an application, the independent variable will be expressed in some natural unit, often time, and the function variable will have another unti such as money, volume, total quantity of something, etc. The units of dy/dx are y-units divided by x-units, so in the equation dy/dx = ky, the units of the constant k must be in units of “reciprocal x”. For example, if x is in seconds then k is in (sec) −^1 : the name for this unit is Hertz, abbreviated Hz. In the solution y = Ce kx^ , notice that the exponent is unitless (as I have previous claimed must be true of exponents). It is good to be aware of this, as it is one easy way to doublecheck your work.
The meaning of these equations in applications is that the rate of change is propori- tional to the present quantity, or to the difference between the present quantity and some limiting value. Therefore we should think of k as a relative rate of change, that is a rate expressed as a fraction of the whole. One example is an interest rate. Interest, even though it produces dollars, is measured in units of inverse time because the dollars cancel: each dollar begets a similar number of future dollars. The number of dollars produced in a year by a single dollar is equal to the number of pennies produced in a year by a single penny or the number of gigabucks produced in a year by a single gigabuck.
be the equilibrium value B plus an offest that decreases exponentially. Many physical systems behave this way (thermal equilibria, radioactive decay, resistor-capacitor net- works) but also systems in social science where there is negative feedback (population approaching a natural limit, price corrections after an economic shock, etc.).
Continuous versus annualized rates
Interest is fundamentally a continuous time phenomenon, especially when the amounts involved are so large that the interest is substantial even in a minute or a few seconds (think National Debt). Consumers, however, are barely able to handle simple interest and haven’t a clue about continous time interest. This has led to regulation where interest rates must be quoted in Annualized Percentage Yield (APY) as well as a simple growth rate.
To see how this works, suppose an asset grows at the rate of 6% per year. If A(t) is value at time t, this means that A^ (t) = 0. 06 A(t) when t is measured in years; the units of the 0.06 are inverse years. After one year, an amount A 0 will grow to A 0 e 0.^06. That means the gain was A 0 (e 0.^06 − 1). Because e 0.^06 ≈ 1 .061837, this means that the percentage growth of the asset in one year was roughly 6.1837%. In other words:
Continuous interest rate of 6% leads to annualized interest rate of 6.1837%.
We can do this for any rate. Let r be the continuous rate (in the above example 0.06) and let A be the annualized rate (in the above example 0.061837). Then r and A are related by the equations:
A = e r^ − 1 ; r = ln(1 + A).
If you write these as percentages, you have to remember to multiply and divide by 100 at the apropriate places:
A = 100(e r/^100 − 1) ; r = 100 ln(1 + A/100).
You can also read about this in Hughes-Hallett, page 571.
The book teaches this clearly and succinctly in half a page starting at the top of page 432, with two worked examples immediately following. I probably don’t need to repeat it for you here, but to summarize very briefly, the steps are:
dy dx
g(x) h(y)
H(y) = G(x) + C
where H is an anti-derivative of h and G is an anti-derivative of g.
y(x) = H −^1 (G(x) + C).
If it bothers you that the equation h(y) dy = g(x) dx is not a real equation because dy and dx aren’t actual numbers and have meaning only as symbols in integrals such as
g(x) dx, then you should read the justification in the middle of page 432.
Example: y ^ = x + xy. You can write this as y ^ = x(1 + y) so it is of the right form with g(x) = x and h(y) = 1/(1 + y). Please see the discussion in the book about the form g(x)H(y) being the same as the form g(x)/h(y) with h(y) = 1/H(y) but don’t be confused: the H in that discussion is NOT the H that’s the anti-derivative of h (I have no idea why they use H instead of some other letter!). Continuing, we write
dy 1 + y
= x dx
and integrate both sides leading to
ln |1 + y| =
x 2 2
Solving gives y ^ /y =
1 + x 4 so ln y =
1 + x 4 dx and so
y = e
√ 1+x^4 dx.
Write this as y = e C+
(^) x 2
√1+t 4 dt and use y(2) = 5 to see that C = ln 5:
y(t) = e ln 5+
(^) x 2
√ 1+x 4 dx (^) = 5e (^) x 2
√ 1+t 4 dt (^).
The point of “solving” when the integral has no nice form is this. The description makes it far easier to compute values reliably for y than if all you know is y ^ = g(x)/h(y) and you have to use Euler iteration.
For this discussion let us suppose, as is most often the case with separable equations, that g and h are both positive. That means G and H are both increasing. This is good because the function H −^1 is well defined and increasing in y, and it makes sense to change the implicit equation H(y) = G(x) + C to the explicit equation y = H −^1 (G(x) + C). The resulting function y(x) will be increasing.
The long term behavior of this system is the behavior as x → ∞. You can tell a lot about this by answering two simple questions:
Is lim (^) x→∞ G(x) finite or infinite?
Is lim (^) y→∞ H(x) finite or infinite?
There are four ways the answers to these two dichotomous questions can come out. Here is a brief description of each of the four, with accompanying examples. Note: this required material is not in the textbook.
Case 1: both limits are infinite. Then both x and y can increase without bound and there will always be a solution to H(y) = G(x). In terms of the graph of y versus x, this means that the graph continues infinitely in both the x and y directions.
Example: y ^ = 5y/x. Then
h(y) = 1 /y g(x) = 5 x H(y) = ln y G(x) = 5 ln x y(x) = exp(5 ln x + c) = Cx 5 with C ¿ 0.
The function Cx 5 increases to infinity as x → ∞.
Case 3: H approaches a finite limit, call it A, while G grows without bound. Then as x → ∞ the function G(x) increases without bound. At some value x 1 = G −^1 (A), the value of G reaches A. At this value and beyond, it is impossible to solve the equation H(y) = G(x) because the right-hand side is at least A while the left-hand side never reaches the value A. As x approaches x 1 from the left, G(x) approaches A which means that H −^1 (G(x)) approaches infinity! The solution y = H −^1 (G(x)) therefore approaches infinity as x approaches x 1 , has a vertical asymptote at x = x 1 , and is not defined thereafter.
Example: y ^ = y 2 , y(0) = 2. Then
h(y) = 1 /y 2 g(x) = 1 H(y) = − 1 /y G(x) = x y(x) = 1 /(C − x) =⇒ C = 1/ 2.
The function 1/(1/ 2 − x) is well defined up until x = 1/2 but becomes infinite at this value. The graph therefore has a vertical asymptote at x = 1/2.
Case 4: Both G and H approach finite limits. In this case, the behavior will depend on which limit is bigger. That, in turn, will depend on the choice of the constant C, which will dpend on the initial conditions. You can tell from a convergence test that both improper integrals converge, but not which limit will be greater.
Example: y ^ = y 2 /x 2. Let’s solve this with the initial condition y(1) = λ. From h(y) = 1/y 2 and g(x) = 1/x 2 we get H(y) = − 1 /y, G(x) = − 1 /x and the general solution
y(x) =
1 /x − C
x 1 − Cx
; C = 1 − 1 /λ.
We may rewrite this as y(x) = xλ/(x + λ − xλ). When λ < 1, the value of C is negative and H(y) reaches greater values than G(x). It is just as if H grows to infinity and we are in Case 2. For example, when λ = 1/2, the solution simplifies to y = x/(1 + x). When λ > 1 the value of C is positive and G(y) reaches greater values than H(x). It is just as if G grows to infinity and we are in Case 3. For example, when λ = 2, the solution simplifies to y(x) = 2x/(2 − x), which blows up at x = 2 with a vertical asymptote. The trajectories in the picture show cases with horizontal asymptotes and vertical asymptotes. For just the right choice of C, the integrals of G and H will be equal and the long term behavior will be as in Case 1. In our example, this happens when C = 0, corresponding to λ = 1 and resulting in the function y = x which has no asymptote and grows without bound (the trajectory in the middle).
For those who would like this broken down into steps, here are the steps.
y ^ + P (x)y = Q(x)
v(x) = e
(^) P (x) dx
Note: you do not have to worry about the +C in this step; any choice works.
v(x)y(x) =
v(x)Q(x) dx.
Note: the integral on the right-hand side may or may not be do-able, but in either case, this time you need to include the +C.