Chapter 2, Math 2250 or 2280, Edwards-Penney textbooks Section 2.1 ================== Updated 2015 2.1-8: Solve y'=7y(y-13) with y(0)=17 ====== Step 1. Identify as variables separable y'=F(x)G(y), with F=7, G=y(y-13). Step 2. Divide by G(y) and apply quadrature to get 7x+c on the right and a partial fraction integration problem on the left: | y'dx | int|---------| = 7x+c | y(y-13) | 1 A B Step 3. Partial fractions ------- = --- + ------ y(y-13) y y - 13 Use a sampling method to solve for A=-/13, B=1/13. Step 4. Evaluate the constant c using y(0)=17. Step 5. Solve for y(x), the explicit solution. Use log and exponential rules and the trick |u| = +1 or -1 times u. Step 6. Answer check. The book answer is correct. The text also has a phase diagram drawn, which matches what you could do in two minutes from the phase line diagram method in class. See textbook section 2.2 for more info. MAPLE ANSWER CHECK # y'=7y(y-13) with y(0)=17 f:=(x,y)->7*y*(y-13); de:=diff(y(x),x)=f(x,y(x)); # Symbol y(x), not y! ic:=y(0)=7; sol:=dsolve([de,ic],y(x)); ans:=rhs(sol); plot(ans,x=0..0.5,y=0..1); # answer 91/(7+6*exp(91*x)) 2.1-16: Solve P'=aP-bP^2, given P(0)=120 and aP=8, bP^2=6 at t=0. ======= The rabbit problem. Information in English in the problem statement implies P'=aP - bP^2, P(0)=120. The terms aP and bP^2, known as birth and death terms, are given at t=0: aP(0)=8, b(P(0))^2=6. Insert P(0)=120 to find a=1/15 and b=6/(120)^2. Let M=a/b=carrying capacity. Then M=160. Use the book formula in section 2.1 for P(t): M P(0) P(t)= ---------------------- P(0)+(M-P(0))exp(-a t) Fill in all the constants and then solve P(T)=0.95 M for T=15 ln(95/15). M P(0) P(T)= ---------------------- P(0)+(M-P(0))exp(-a T) 95M M P(0) --- = ---------------------- Cancel M 100 P(0)+(M-P(0))exp(-a T) 95 120 --- = ---------------------- Subst P(0)=120, 100 120+(160-120)exp(-T/15) a=1/15, M=160 To Finish: Cross-multiply and isolate exp(-T/15) on the left. Take the log of both sides, simplify, and find the value of unknown T. MAPLE ANSWER CHECK # P'=aP-bP^2 with a=1/15, b=6/120^2, P(0)=120 a:=1/15:b:=6/120^2: f:=(t,P)->a*P-b*P^2; de:=diff(P(t),t)=f(t,P(t)); # Symbol P(t), not P! ic:=P(0)=120; sol:=dsolve([de,ic],P(t)); ans:=rhs(sol); plot(ans,t=0..100); # ans := 480/(3+exp(-t/15)) Section 2.2 ================== Updated 2015 2.2-10: Solve x'= -x^2 + 7x - 10 ======= Factor the quadratic as -(x^2-7x+10) = -(x-5)(x-2). Substitute P=x-5 or P=x-2 to make it into a Verhulst DE. For P=x-2 we would get Verhulst DE P' = -(x - 2 -3)(x-2) = -(P-3)(P) = (3-P)P Then P'=(a-bP)P with a=3 and b=1. Plug a,b into the equation a P_0 P(t) = ----------------------- bP_0 + (a-b P_0)exp(at) to find P(t) and then back-substitute to obtain x(t) = 2 + P(t) = something like the BOB answer. The twist: P_0 = x_0 -2, which requires even more algebra, finally matching the book's answer. MAPLE ANSWER CHECK # x'= -x^2 + 7x - 10 f:=(t,x)->-x^2+7*x-10; de:=diff(x(t),t)=f(t,x(t)); # Symbol x(t), not x! sol:=dsolve(de,x(t)); # answer x(t) = (5*exp(3*t)*_C1-2)/(-1+exp(3*t)*_C1) # Symbol _C1 is an arbitrary constant, call it c. Then # x(t) = (5*c*exp(3*t)-2)/(c*exp(3*t)-1) 2.2-14: Given x' = x(x^2 - 4) ====== Make a phase line diagram and a phase diagram Add labels: spout, funnel, node, stable, unstable Don't use a computer. Method: Step 1. Find the equilibria x=0, x=2, x= -2 Step 2. Add them to the phase line diagram Step 3. Evaluate x' = x(x^2 - 4) at t=0, x=x_0 where x_0 is located between equilibria. Example: for 0 < x_0 < 2, choose x_0 = 1 (a point between) Then | x' = x(x^2 - 4) | = 1(1^2 - 4) = negative | x = 1 Step 4. Add the PLUS and MINUS signs to the phase line diagram. Step 5. Draw the phase diagram. First, draw the equilibria, they are horizontal lines x = 0, x = -2, x = 2 Second, draw threaded edge-to-edge curves, based on the PLUS and MINUS signs. Draw an increasing threaded curve for PLUS. Draw a decreasing threaded curve for MINUS. Step 6. Identify spout, funnel and node from geometry. Then add STABLE to the funnel and UNSTABLE to the others. Put all labels onto the phase diagram. Reminder: Don't use a computer! This problem is a template for Midterm 1 problem 5. 2.2-18: Given x' = x^3(x^2 - 4) Make a phase line diagram and a phase diagram Add labels: spout, funnel, node, stable, unstable Don't use a computer. Method: Step 1. Find the equilibria x=0, x=2, x= -2 Step 2. Add them to the phase line diagram Step 3. Evaluate x' = x^3(x^2 - 4) at t=0, x=x_0 where x_0 is located between equilibria. Example: For 0 < x_0 < 2, choose x_0 = 1 (a point between) Then | x' = x^3(x^2 - 4) | = 1(1^2 - 4) = negative | x = 1 Step 4. Add the PLUS and MINUS signs to the phase line diagram. Step 5. Draw the phase diagram. First, draw the equilibria, they are horizontal lines x = 0, x = -2, x = 2 Second, draw threaded edge-to-edge curves, based on the PLUS and MINUS signs. Draw an increasing threaded curve for PLUS. Draw a decreasing threaded curve for MINUS. Step 6. Identify spout, funnel and node from geometry. Then add STABLE to the funnel and UNSTABLE to the others. Put all labels onto the phase diagram. Reminder: Don't use a computer! This problem is a template for Midterm 1 problem 5. Section 2.3 ================== Updated 2015 2.3-10: ======= Prior to chute open, the velocity model is v'=-32-0.15v, v(0)=0. The distance model is y'=v(t), y(0)=10000. The answers are v(20) approx -202 and y(20) approx 7084. After chute open, the velocity model is w'=-32-1.5w, w(0)=v(20). The distance model is x'=w(t), x(0)=y(20). Some maple solving is required, or a graphing calculator with zoom, to find the answer t approx 326. The book's answer is 300 min (5 min) plus 47 seconds. This is obtained by adding 20 sec to the 326 sec found after chute open. =====maple example===== eq:= -120*exp(-1.5*t)+21*t; solve(eq=7000,t); # solve an equation for t # This code must be modified to solve problem 2.3-10 2.3-20: ======= The solution uses book formulas. There is no solving of a DE, because that has been done already in the textbook, section 2.3. The model is v'=-g-r v^2, v(0)=160 where g=32 and r=1/800. This model is solved on page 101. Do not solve the model; use formulae (13), (14) page 103 with v0=160, g=32, rho=1/800. The symbol y(t) is the height of the bolt measured from the ground, so y(0)=0. The maximum height is obtained for a value of t found by setting the velocity zero, using equation (13). Because tan(theta)=0 at theta=0, then the tangent argument in (13) must be zero: C_1 - t sqrt(rho g) = 0. Solve this equation for t, then make t into a decimal number using C_1 = arctan(v_0 sqrt(rho/g)). Use equation (14) with the computed value of t to find the maximum height. Answer 277.26 ft published in the BOB is correct. 2.3-22: ======= The formulas in the textbook are used. No solving of the DE is required. The model is v'=-g+r v^2 where g=32 and r=0.075 (Downward Motion, page 104). Because the parachutist bails, v(0)=0 and y(0)=10000=y0, where y(t) is the distance from the ground. Equations (16) and (17) require v(t)<0, which means y'(t)<0 or y(t) decreasing. Opposite coordinates in which y(t) increases and measures the distance from the airplane would require a different model, not found in the textbook. Use formulae (17), (18) to answer the questions. Do not solve the DE; that is done in the book. Formula (17) gives 0=y0-(1/r)ln(u(t)) where y0=10000, r=0.075, u(t)=cosh(c2-t sqrt(rg))/cosh(c2). Solve for t to find the flight time. The terminal velocity is given by (18), the logic from (16), in which tanh(theta) approaches 1 at theta= -infinity. DEFINITIONS. cosh(u) is the hyperbolic cosine, defined by cosh(u)=(exp(u)+exp(-u))/2 sinh(u) is the hyperbolic sine, defined by sinh(u)=(exp(u)-exp(-u))/2 tanh(u)=sinh(u)/cosh(u) arctanh(u) is defined by arctanh(tanh(x))=x Similarly for arcsinh, arccosh. maple details ======= u:=t->cosh(c2-t*sqrt(rho*g))/cosh(c2); eq:=10000-(1/rho)*ln(u(t)); solve(eq=0,t); # solve an equation for t maple end ====== === DEplot notes === with(DEtools): de:=diff(x(t),t)=x(t)*(2-x(t)): var:=x(t):tDomain:=t=0..5: dots:=[[x(0)=1],[x(0)=1.5],[x(0)=2.2],[x(0)=-0.2]]: wind:=x=-2..3: opts:=linecolor=BLACK,thickness=3,stepsize=0.1: DEplot(de,var,tDomain,dots,wind,opts); # This plot can also be carried out from a GUI Tool in maple 12 and 13. # To find it, start java maple 12 or 13, then goto menu item # TOOLS ==> ASSISTANTS ==> ODE ANALYZER # An equivalent command in either a java or non-java worksheet is dsolve[interactive](); # Once started, enter the differential equation as ## diff(x(t),t)=x(t)*(2-x(t)) # and the initial condition as ## x(0)=1.5 # Try buttons ## SOLVE SYMBOLICALLY ### Click on SHOW MAPLE COMMANDS ## SOLVE ## PLOT === DEplot notes 2 === with(DEtools): de:=diff(x(t),t)=x(t)*(1-x(t)): vars:=x(t): wind:=t=0..5,x=-0.2..3: ic:=[[x(0)=1.2],[x(0)=1],[x(0)=0],[x(0)=0.5]]: opts:=stepsize=.2,title=`Verhulst model`,arrows=MEDIUM: DEplot(de,vars,wind,ic,opts); # This plot can also be carried out from a GUI Tool in maple 12 and 13. # To find it, start java maple 12 or 13, then goto menu item # TOOLS ==> ASSISTANTS ==> ODE ANALYZER # An equivalent command in either a java or non-java worksheet is dsolve[interactive](); # Once started, enter the differential equation as ## diff(x(t),t)=x(t)*(1-x(t)) # and the initial condition as ## x(0)=1.2 # Try buttons ## SOLVE SYMBOLICALLY ### Click on SHOW MAPLE COMMANDS ## SOLVE ## PLOT Section 2.4 ================== See numerical links at the course web site. Euler's method, also Rectangular Rule Section 2.5 ================== See numerical links at the course web site. Improved Euler or Heun's method, also Trapezoidal Rule Section 2.6 ================== See numerical links at the course web site. Runge-Kutta 4 (RK4), also Simpson's Rule