



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Math 334
dy dx
where
p(x) =
1 , 0 6 x 6 2 , 3 , x > 2.
(a) Find the general solution for 0 6 x 6 2. (b) Choose the constant in the solution of part (a) so that the initial condition is satisfied. (c) Find the general solution for x > 2. (d) Now choose the constant in the solution of part (c) so that the solution from part (b) and the solution from part (c) agree at x = 2. By patching the two solutions together in this way we obtain a continuous function that satisfies the differential equation except at x = 2, where its derivative is undefined. (e) Sketch a graph of the solution from x = 0 to x = 5.
Solution
(a) For 0 6 x 6 2 we have dy dx
for which the solution is: y(x) = x − 1 + Ce−x. (b) Applying the initial condition y(0) = 1 to the solution from part (a) yields: y(x) = x − 1 + 2e−x (c) For x > 2 we have dy dx
for which the solution is: y(x) = (3x − 1)/9 + Ce−^3 x. (d) From parts (b) and (c) we have
y(x) =
x − 1 + 2e−x, 0 6 x 6 2 , (3x − 1)/9 + Ce−^3 x, x > 2.
We choose the constant C so that the solution is continuous at x = 2, which means that we require lim x→ 2 +
y(x) = lim x→ 2 −
y(x) i.e.
This means that C =
e^6 + 2e^4 and the solution is:
y(x) =
x − 1 + 2e−x, 0 6 x 6 2 , 3 x − 1 9
e^6 −^3 x^ + 2e^4 −^3 x, x > 2.
(e) The graph of the solution looks like:
1 2 3 4 5
1
(a 1 x + b 1 y + c 1 )dx + (a 2 x + b 2 y + c 2 )dy = 0.
If a 1 b 2 = a 2 b 1 , show that this equation reduces to the form y′^ = g(ax + by).
Solution Rewrite the equation as: dy dx
a 1 x + b 1 y + c 1 a 2 x + b 2 y + c 2
The condition a 1 b 2 = a 2 b 1 implies a 2 a 1
b 2 b 1
= λ. Substituting a 2 = λa 1 and b 2 = λb 1 into the equation yields: dy dx
a 1 x + b 1 y + c 1 λ(a 1 x + b 1 y) + c 2
= g(a 1 x + b 1 y),
where g(ξ) = −
ξ + c 1 λξ + c 2
= x^3 (y − x)^2 + y x
(a) Guess a solution to this equation. (b) Use the particular solution from part (a) to reduce the equation to a Bernoulli equation. (c) Solve the Bernoulli equation you obtained in part (b).
Solution
(a) By inspection a solution to the equation is given by y 1 (x) = x. (b) Make a transformation y(x) = y 1 (x) + v(x) = x + v(x) to get a Bernoulli equation for v:
dv dx
x
v = x^3 v^2.
(c) To solve this Bernoulli equation make the change of variables w = v−^1. The equation for w is:
dw dx
x
w = −x^3.
(a) Re–write the differential equation in the form M dx + N dy = 0:
[x sin(x + y) − cos(x + y)] dx + x sin(x + y) dy = 0.
We see that
∂y
= x cos(x + y) + sin(x + y) =
∂x
, so the equation is exact. There exists a function F for which df = M dx + N dy. Therefore
F (x, y) =
M (x, y) dx =
[x sin(x + y) − cos(x + y)] dx = −x cos(x + y) + g(y).
Then ∂F ∂y
= N(x, y) =⇒ g′(y) = 0 =⇒ g(y) = c.
Thus F (x, y) = −x cos(x + y) + c, and the solution is
x cos(x + y) = c.
(b) This is a second oeder ordinary differential equation with the dependent variable missing. We may reduce this to a first order ordinary differential equation by letting v = y′. The equation becomes x^2 v′^ + xv = 1 or, re–writing xv′^ + v =
x
We then have
(xv)′^ = xv′^ + v =
x
=⇒ xv = ln |x| + c 1 =⇒ y′^ =
ln |x| + c 1 x
Therefore the solution is y =
(ln |x|)^2 + c 1 ln |x| + c 2.
(a) (ex^ − 3 x^2 y^2 ) y′^ + yex^ = 2xy^3 ; (b) (6x + 4y + 3) dx + (3x + 2y + 2) dy = 0.
Solution
(a) Re–write the differential equation in the form M dx + N dy = 0:
(yex^ − 2 xy^3 ) dx + (ex^ − 3 x^2 y^2 ) dy = 0.
We see that
∂y
= ex^ − 6 xy^2 =
∂x
, so the equation is exact. There exists a function F for which df = M dx + N dy. Therefore
F (x, y) =
M (x, y) dx =
[yex^ − 2 xy^3 ] dx = yex^ − x^2 y^3 + g(y).
Then ∂F ∂y
= N(x, y) =⇒ g′(y) = 0 =⇒ g(y) = c.
Thus F (x, y) = yex^ − x^2 y^3 + c, and the solution is
yex^ − x^2 y^3 = c.
(b) Re write the equation as dy dx
6 x + 4y + 3 3 x + 2y + 2
2(3x + 2y) + 3 3 x + 2y + 2
We see that this differential equation is of the form y′^ = g(3x + 2y). Thus, let v = 3x + 2y. Then dv dx
dy dx
2 v + 3 v + 2
v v + 2
This equation is separable, so we get ( 1 +
v
dv = −dx =⇒ v + 2 ln |v| = −x + c.
Therefore the solution is 3 x + 2y + ln(3x + 2y)^2 + x = c.
(a) y′′^ − 4 y = 0; (b) y′′^ − 2 y′^ + y = 0; (c) y′′^ − 2 y′^ + 2y = 0.
For each equation do the following:
For the equation from part (a) solve the resulting first order differetial equation for y.
Solution These are all second order ordinary differential equations, of the form y′′^ + ay′^ + by = 0 for various values of a and b, with the independent variable missing. We may reduce this to a first order differential equation by letting v(y) = y′(x). Then y′′^ = vv′^ and the equation becomes
vv′^ + av + by = 0 which can be re-written as v′^ = −a − b
y v
This equation is homogeneous. To solve, we set w = v/y. Then v′^ = yw′^ + w and the differential equation becomes yw′^ = −a −
b w
− w = −
w^2 + aw + b w
which is separable: w dw w^2 + aw + b
dy y
(a) For a = 0 and b = −4 we get
w dw w^2 − 4
dy y
ln |w^2 − 4 | = − ln |y| + c 1 =⇒ w = ±
c 2 + 4y^2 y
But w = v/y and v = y′^ so y′^ = ±
c 2 + 4y^2. This equation is also separable: dy √ c 2 + 4y^2
= ±dx = εdx, where ε = ± 1.
Integrate and solve for y: 1 2
ln | 2 y +
c 2 + 4y^2 | = εx + c 3 =⇒ 2 y +
c 2 + 4y^2 = Ae^2 εx^ =⇒ y = αe^2 x^ + βe−^2 x.
(a) Dividing the first equation by the second equation results in
dy dx
dy/dt dx/dt
−axy −bxy
a b
(b) Solving the equation in part (a), we get by = ax + c. Using y(0) = y 0 and x(0) = x 0 implies that c = by 0 − ax 0.
(c) Inserting the result from part (b) into Eq. (2) yields dx dt
= −x(ax + c), which is a separable o.d.e. We get
dx x(ax + c) = −dt =⇒
x
a ax + c
dx = −c dt =⇒ ln x − ln(ax + c) = −ct + c 1.
The initial condition x(0) = x 0 implies that c 1 = ln
x 0 ax 0 + c
. Solving for x yields:
x(t) =
cx 0 e−ct by 0 − ax 0 e−ct^
Plugging this expression for x into by = ax + c yields:
y(t) = cy 0 by 0 − ax 0 e−ct^
(d) The number of surviving troops for each side is given by:
xs := lim t→∞ x(t) = lim t→∞
cx 0 e−ct by 0 − ax 0 e−ct^
0 c > 0 −c/a c < 0
ys := lim t→∞ y(t) = lim t→∞
cy 0 by 0 − ax 0 e−ct^
c/b c > 0 0 c < 0
Thus, the y troops win the guerrilla war if xs = 0, i.e. if c > 0. Interpretation of results: i. (a = b: armies of equal capabilities) If a = b, then both armies lose troops in battle at the same rate. In this case c > 0 implies y 0 > x 0. In other words, given two armies of equal capabilities, the one that starts with more troops wins. ii. (x 0 = y 0 : armies of equal size) If x 0 = y 0 , then both armies start with the same number of troops. In this case c > 0 implies b > a. In other words, given two armies of equal size initially, the one that loses troops at the lower rate, i.e. the army with the better soldiers, wins.