Вы находитесь на странице: 1из 16
BMA 771 HW2 For 2.1.1-2.1.3 % = sinx 2.1.1. Find all fix points for the flow ‘The fixed points occur where x = 0, or sin x = 0. This occurs when x = n,n € Z, so all of the fixed points of x are of the form above. Fix-points for m odd are stable, 2.1.2. At which points does the flow have the greatest velocity to the right? Since % is the sine function, it is common knowledge that the local maxima occur at x 2nn,n € Z, which is where the sine function equals 1. % represents the velocity of the flow, so the local maxima defined above are where the velocity is the greatest to the right. 2.1.3. Find the flow’s acceleration as a function of x a) © SMO) cose) 2 cos(x) sin(x) = sin(2x) /2 1/2. These points, ¢ is the formula for the b) The local maxima for ¥ occur when x = at mm,n € Z, or where ¥ represent where the flow has the maximum positive acceleration since acceleration of the flow in terms of x 2.1.4. Show that the solution for the equation can be converted to find x(t) a) se(S) + ce( 8) sc(x) + cot(x) v2t1 v2+1 (v2 +1) sin@) cain esc(x) + cot(x) 1 cf ~~ cos(x) +1 sin(x) “ sin(x) ef sin@x) Frat Tes ef sin(x) __28in()cos (3) tan (5) + x(@ = 2tan VE+1 1 c0s() 1+ 2c0s? (§) - In the above equality, as ¢ -» 09, x(t) + 1 because 1/2 is a vertical asymptote for tan(x), and tan(x)-+ 9 as x-> 1. b) Try to find the analytical solution for x(t) given an arbitrary initial condition xo ‘The analytical solution for x(t) when Xo is arbitrary instead of 1/4 is: x(@) = 2tan loys) ese) + cotCx), This is directly interpreted from the calculations done is part a). This ean be somewhat simplified to x(t) = 2tan* (=) u eot(z9/2). ing double angle formulas, 2.1.5. a) Find a mechanical system that is approximately governed by % = sin(x) A simple pendulum. b) Using physical intuition, explain why x’ = 0 is unstable and x* = zis stable. Atx* = 0 the pendulum is not moving. Any small perturbation away from this fix point will cause the pendulum to swing. At x° = 1, however, any small perturbation away from this point will be attracted to the fix point, 2.2.3. Analyze the equation graphically, ~ = x — x*, The fixed points are x = -1,0,1. Judging from the Figure 2.3.1 below, the fix points x = —1, 1 are stable and x = 0 is unstable. A sketch of x(t) for some initial conditions is given in Figure 2.3.2. A solution to this differential equation can be obtained using separation of variables. as To solve ¢ analytically I start with separation of variables. /acaara fe By partial fraction decomposition we can get the integral of the RHS to Lis fara fares Solving the integral and simplifying results in Question 2.2.5 ‘The system # = 1+ Scos(x) does not have any fixed points. Analytically ‘ean be seen! cos(z) = eox(z) However, the fimetion os(2) #2. By graphing x v3 + it ean alo be seen thatthe fncton nover cross the x axis sd therefore doesnot have any fixed points Analytical solution dx _ 2+ cos(x) aera dx 2+ cos(x) 2 dx T¥1+cos(x) 2 Wolfram Alpha can find the solution giving +V3e x(t) = 2tan-t (vate (S53*4) ) Hannah Blackmon BMA 771 (Olufsen 3:00 PND: Assignment #2 September 14, 2015, 2.3 Population growth examples 2.9.8 (Tumor growth) Growth of cancerous tumors ean be modeled by the Gompertz law N= -aN'in(bN), where N(t) is proportional to the number of cells in the tumor, and «,b > 0, are parameters. a) Interpret a and b biologically ‘a’ isthe intrinsic growth rate of the cell, and ‘)7)” is the environ ntal carrying eapacity. b.) Sketch the vector field and graph, N(t), for various initial values, ‘The fixed points for N* are aN nibN} =0 InN) =0 wae wn) =1 xO With the following vector fields for varying initial conditions and parameter values Figure 3: Veetor field 2.8.3.1 Figure 4: Veotor fold 2.3.3.2 Page 4 of 15 Show that N/N = r —a(N ~ 6}? provides an example of Allee effect, if ra, and b satisfy certain constraints, to be determined. Assuming ra, > 0, we found that this equation does Allee effect, The vate a weak and a stroug In contrast, t ‘To show the existence of both types of Allee effects, we used the Manipulate command in Mathematica to find certain values of a, b, and r that ereate an Allee effect (code attached at end). We used the fixed points (sec below) to differentiate between the weak and the strong Allee effect. The weak effect occurs when r > ab? and the strong effect occurs when r < ab? Find all the fixed points of the system and classify their stability FN) Nr ~aN(N ~ 6)? = Nr ~aN(N? - 2bN +?) = N(—aN? + 2abN +1 ~ al?) =0 To find the fixed points, we solve for N Therefore, the three fixed points are ~2ab + VIO + tale al 2a Nt =0,N" vi abe To classily their stability, we us N*. First note that /’(N) linear stability analysis by looking at /"(NV*) for each = 3aN? + dabN — ab? N*=0: (0) =r—al®, Ifr > a2, f'(0) > 0 and N* unstable fixed point. Ifr < al#, (0) <0 and N* = 0 is a stable fixed point. Nt = 498: Plot af) =r —Ba(b+E)?+4ab(b+£)—al? = ~2r—2b/ave Since a,b, > 0, then clearly ~2r —2/ayrb <0. Therefore, V* = b+ 44 is a stable fixed point, S(O-¥) =v 3a(b— 4)? dab(b— FB) —ab? = hYaeyF—2r = b-. If > &, the fixed point is unstable, Sketch the solutions M(t) for different initial conditions We were not able to find att analytical solution to the equation using separation of vati- ables or change of variables. Attempts to solve the equation using Matlab and Math- ematica’s DSolve function were also unsuecessful. Therefore, the numerical solutions found using the second order Runge-Kutta method and the ODE45 Matlab function were plotted in Figure (9) and Figure (10) using the initial conditions V(0) = 1 and N(0) =7 and the parameters for the strong Allee effect found in Mathematica, Note 2 ie ie According to the graphical analysis on fig. 4a, for the ease with 3 fixed points, N = 0 and N = b+ \/r/a are stable, and N = 6 /r/a is unstable. Fig. 5a shows that in case of 2 fixed points NV = 0/is unstable and N = b+ V/*/a is stable. NIN =1~a (N-b NN a (N-bF (a) () Figure 4: Graphical analysis of 2 V —b)?). 3 fixed points case. NIN =1—a(N-b)? ~a(n-b? a -15) 2 0.25 0 025 05 075 1 125 15 N @ (b) Figure 5: Graphical analysis of N= N (r — a(N — b)?). 2 fixed points case. Hannab Blackmon BMA 771 (Olufsen 3:00 PMD): Assignment #2 September 14, 2015 Figure 6: Forb < VE 2.4 Use stability analysis fails because {/(2") tar stability analysis to classify the fixed points of the following systems. If linear 0, then use the graphical argument to decide stability. 24.2 a(1-2)(2-2) aking # we have a(t ~ 2)(2-2) ete 0.12 and taking fla) = 2032 42% f(a) = 808 a 42 and evaluating the derivative of f at tho fixed points we have £(0) =2 > unstable f(t) = -1> stable £2) =2 > uustadte 2.4.8 Using linear stability analysis, classify the fixed points of the Gompertz model of tumor growth, N= —aiV In(b2 From 2.3.3 we have our fixed points : N= 04 Defining JN ~aN In(N) such that JN) = ~aln(bN) ~ a Evaluating the derivative of fat the fixed points we have J") = ~aln(0) ~a Page 7 of 15 ie BMA 771 (Olufsen 100 PM): Assignment #2 September 14, 2015, Implying that our fixed point N* =0 is unstable Va > 0. Taking i L LG) = ain 5 alu(l) ~@ Showing that our fixed point N* = } is stable Va > 0, 2.5 2.5.1 (Reaching a fixed point in a finite time) A particle travels on the half-line, 2 > 0, with a velocity given by # = —2° 2°, where € R is a constant 14) Find all values af ¢ such that the origin, x =0, is a slable fied point Letting * = 0 to be our fixed point, graphically we can see that itis stable We > 0 Figure 7: Vector field 23.3.2 b,) Now assume that c is chosen such that 2 =()is stable. Can the particle cver reach the origin in a finite time? If s0, how lony does it take for the particle to travel from x= 0 tox =1, as a funetion of e? For 2 =0, we have fo =k, and for 2 = 1. we have 6, ‘This gives us Ato oT where r > 0 is fixed. Show that 2(¢) -» -too in finite 2.5.3 Consider the equation Page 8 of 15 EINE iy BMA 771 (Olsen 3:00 PM): Assignment #2 September 14, 2015, time, starting from any initial condition x / ‘Taking de warete® a ae | ae ae red ere In(z) _ In(r-+29) 1 tw fa 2-4 05In (fx) 9. Thon can sty for somo constant, k, for any 2 #0. 2.6 2.6.1 Explain the paradox: a simple harmonic oscillator mt one dimension (along the x-axis). But the text says one-« ‘kx is a system that oseillates in jensional systems can't osci mi = —ber is a second-order ODE: which eau be expressed as system of two first-order ODE's, therefore making the oscillations possible. 2.7 For the following vector fields, plot the potential function V(¢) and identify all equilibrium w ~ Ex se) aw -& = sin(2) \a)de V (2) = con(e) + Taking the constant, e= 0, and ont 2" (0) = cos" (0) 2'(t)= bon Ynez Graphing V(x) we have Page 9 of 15, diario BMA 771 (Olufsen 3:00 PMD: Assignment #2 September 14, 2015 Figure 8 Graph of V(x) Observing the local minima occur where n is odd, aud the local maxima oceur where 1 is even, we have Forn=2k+1, ke Z= stable For n= 2h, KEE unstable Numerical Methods Solve 2.4.8 equation using Bulers method, the 2-step Runge Kutta method (2 methods with 2=1/2 and alpha: and using w1: /2), and using Matlab’s build in ODE solver odet5. Calculate the error between analytical and numerical solutions. ‘What do you observe? For the differential equation we foun our analytic solution to be - (0) = Nye Using the paramoter and initial condition values from the literature used, we found the plots for the errors between the numerical anc analytic solutions seemed to Lehave like a logistic function leveling off around 5. With the parameter estimations for Np = 0, a = 0.159, and b = 1.02, we were returned the following plots Figure 9: Plot w/ analytic Page 10 of 15 ee BMA 771 (Oluen 3:00 PM): Assignment #2 September 14, 2015 Figure 10: Error Plot Examining the errors we found that they seem relatively high, but from the literature the cellular earrying capacity for the environment regarding the growth of Osteosarcomas was in the range of 10°, With respect to the magnitude of the carrying capacity, the errors are relatively small [1]. ‘tial values such that the model equations represent real biologi- ith a literature reference) describing the populations Set parameter values and i cal populations. Include a paragraph ( chosen. For parameter values for the Gompertz tumor growth problem, we used a paper that worked on uniqueness and sensitivity analysis of parameter values for the Gompertz tusnor growth model. For one of the analyses they used Osteosarcomas, and they determined that a = 0.159, b= 1.02, with « Volume Rate Doubling time (VRD) of VRD = 0.7191(1), Page 11 of 15, comme BMA 771 (Olufen 300 PAD): Assignment #2 MATLAB function eulerexanple2 4% Scare tine tend = 8; % End tine at = 0.1 1 Detsa t © = (O:dt:tend] M_ = length(t); yO = 0.1; ¥ Initial condition yout) = yO; % Apply the initial condition yan(1) = 90; yaa) = yl yee) ~ 30; 1 The general ODE: ay/at = £(t,y) Dur example autonomous ODE: dy/dt = £(0,y) = y (1-¥) 4 the emall step size n= at Yeulers method: y.nel = yin + dv (tn, yn) for i = 2:1 yeas) = yeu(s-2) + fot(yeuCs-2))adey end Wand order RK method #1: yisw2e1/2; alphaxbevaet for i = 2iM KL = dt * fet(yret(i-1)) HQ dee fet (yrid(i-t) + Ki); rk (4) = yeki(S-1)+ 1/20KL + 1/24K2; end; Wand order RK method #2: wi-0; wet; alpha-teta-i/2 for i = 208 La = dt * fox(yrka(i-1)); 12 = ate fet GyrkQ(i-1) + 1/2411); yRIQ(1) = yexaCi-1) + 1/2012; end; 4 Solved numerically using watlab options = odeset(*RelTol’ ,1e-6, 'Abstol”, 12-6) September 14, 2015 Page 12 of 15 ‘Repaispea, BMA TI (Oluisen $:00 PM): Assignment $2 September 14, 2015 sol = odedS(rhs, (tstars tend],y0,optione); ( function nase, time interval, initial conditions, option yod = doval(sol,t); % interpolates the eolution at t= 0 0.10.20.3. 4 Analytica? solution: yan = .Otvexp((1.02/0.169)*(exp(d-1.026¢))) 5 4 Error eu = abs(yeu-yan) Ered = abe(yrki-yan) Erk? = abs(yrk2-yan) Bod * abs (yod-yan) Figure(3) Lot (t yan, "kt, yeu, "b?,t,yrkl, "g!,t,yek2, "x? tyyed, cD; set (a, "Linewideh’ ,2); set (gea, 'fontsize" 20); xlabel('time") ; ylabel('y’); Legend(’ana’ ,"eul?, "217, "rk2?, ’oded5?) ; x1in({0 5]); grid; tigure(6); Aeplot(t yam, ?k? ,t,yeu,’b" ,t y2kt,'g?,tayek2, x? ,t,yods!e?); set(h, ‘linewidth’ ,2); set(gea, 'fontsize’ 20); xlabel('tine’ ylabel('y?); legend( ana’, xlin((0 51) grid: jul’, "rkL? "22" ,"odeas?) 5 figure(4); jot(t eu,t Erkt,tErk2,"r",t zed) set(h, linewidth’ ,2); set(gea, "fontsize’ 20); xlabel(’tine’) ; ylabelerror") Legend(evler?, 'rki!, 'rk2’, Yodes6); xaim((0 5); grid; figure(s); beplot(t,Erktt,Eed,’r/); Ch, linewidth’ ,2); set(gea, 'fontsize’ ,20); Page 13 of 15 coer ae BMA 771 (Olufsen 00 PMD): Assignment #2 xlabel time’); ylabel error’) ; xlin({0 5)); grid; Eigure(s); plov(t Eod,'r") ; set(h, ‘Linevideh’ 2); set (gea, "fontsize’ 20); xlabel('tine”); ylabel error’); xiin((0 5]); aria; function ay = rhs(t,3) ay = 0. 289¢ye10g(3.024y) 5 function £ = fet(y) £ > 0, 1694yrLog(1.02+y) September 14, 2015 Page 14 of 15 ‘Piiinctewinckemnrs BMA 771 (Olufsen 3:00 PM): Assignment #2 September 14, 2015 References 1] M. Picchaimani, Somasndara ©. G, and ‘Thm Eakin, Unique estimation of solid tumour growth gom- pertz parameter ancl its sensitivity behaviour, British Journal of Mathematics and Computer Science, 4(18):2603-2617, 2014 Page 15 of 15

Вам также может понравиться