* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download College of Engineering and Computer Science Mechanical
Perturbation theory (quantum mechanics) wikipedia , lookup
Pattern recognition wikipedia , lookup
Mathematical descriptions of the electromagnetic field wikipedia , lookup
Plateau principle wikipedia , lookup
Computational electromagnetics wikipedia , lookup
Computational fluid dynamics wikipedia , lookup
Two-body Dirac equations wikipedia , lookup
Routhian mechanics wikipedia , lookup
Multidimensional empirical mode decomposition wikipedia , lookup
Eigenvalues and eigenvectors wikipedia , lookup
Lattice Boltzmann methods wikipedia , lookup
Perturbation theory wikipedia , lookup
College of Engineering and Computer Science Mechanical Engineering Department Mechanical Engineering 501A Seminar in Engineering Analysis Fall 2004 Number: 17472 Instructor: Larry Caretto November 2 Homework Solutions Page 174, problem 9 – Determine the type and stability of the critical point for the system of equations shown below. Then find a general solution. Finally sketch or plot some trajectories in the phase plane. (Show the details of your work.) dy1 2 y1 6 y2 dt dy2 8 y1 4 y2 dt Writing this as a matrix equation we have a11 = -2, a12 = -6, a21 = -8, and a22 = -4. The trace of this matrix is -2 – 4 = -6 and the determinant is (-2)(-4) – (-8)(-6) = -40. The negative determinant indicates that it is a saddle point which is unstable . This problem is solved by converting the system into a second order equation. See the next problem for the solution approach using eigenvectors. The general solution can be found by differentiating the equation for dy1/dt and substituting the equation for dy2/dt into the result. d 2 y1 dy1 dy2 dy1 2 6 2 6 8 y1 4 y2 dt dt dt dt 2 From the original equation for dy1/dt we see that y2 = (-1/6)dy1/dt – y1/3. Using this result in the equation above for d2y1/dt2 gives. d 2 y1 dy1 dy1 1 dy1 y1 2 6 8 y 4 y 2 48 y 24 1 2 1 dt dt 3 dt 2 6 dt Rearranging this result and placing it into the usual form for a second order homogenous equation gives. d 2 y1 dy1 6 40 y1 0 dt dt 2 The characteristic equation for this differential equation is 2 + 6 – 40 = 0, which can be factored into ( + 10)( – 4) = 0. The roots of the latter equation are = -10 and = 4, so the solution to the differential equation for y1 is. y1 C1e 10t C2 e 4t From the equation we previously derived that y2 = (-1/6)dy1/dt – y1/3 we can find the result for y2 as follows. y2 1 dy1 y1 1 1 10C1e 10t 4C2 e 4t C1e 10t C2 e 4t 6 dt 3 6 3 Engineering Building Room 1333 Email: [email protected] Mail Code 8348 Phone: 818.677.6448 Fax: 818.677.7062 November 2 homework solutions ME501A, L. S. Caretto, Fall 2004 Page 2 10 1 4 1 4 y2 C1e 10t C2 e 4t C1e 10t C2 e 4t 6 3 6 3 3 The solution in the text has a slightly different form for the e-10t term. In the equation for y1 the constant is 3c1 and in the equation for y2 the constant is 4c2. Since the final value of the constant is determined by the initial conditions, what is important in the result is that the constant multiplying the e-10t term in the y2 equation is 4/3 times the constant multiplying the same term in the y1 equation. This result holds for both the solution here and the one in the text. Some sample trajectories are shown in the figure below for different values of C 1 and C2. Page 174 Problem 9 Sample Trajectories 6 Start Start C1=-.10,C2=-.50 4 C1=.10,C2=.50 C1=-.20,C2=.05 y2 2 C1=4.00,C2=.10 0 Start Start All trajectories start at t = 0 and continue until t = 0.5 -2 -4 -6 -6 -4 -2 0 2 4 6 y1 Page 174, problem 13 – Solve y’’ + ay’ = 0 (a is constant) and plot some of the trajectories. We can define y1 = y and y2 y’ to get the following matrix equation. dy1 y 2 a11 y1 a12 y 2 dy 0 1 y1 dt Ay dy2 0 a y 2 ay2 a11 y1 a12 y 2 dt dt We can find the matrix eigenvalues by the usual equation that Det(A – I) = 0. 1 Det (A I) 2 a a 0 0 a So the eigenvalues are = 0 and = -a. The corresponding eigenvectors are found below. The general equation for the eigenvector components is November 2 homework solutions ME501A, L. S. Caretto, Fall 2004 1 x1 ( A I)x 0 0 a x2 Page 3 x1 x2 0 a x2 0 For = 0, we have x2 = 0 and x1 arbitrary. Setting x1 = 0 gives the = 0 eigenvector as [1 0]T. For = -a, the first equation gives x1 = – x2/a but the second equation becomes 0 = 0 which leaves x2 arbitrary. If we pick x2 = a we have x1 = –1 so our second eigenvector is [-1 a]T. Thus our solution to this problem is. y1 1 1 at y C1 0 C 2 a e 2 We see that y1 = C1 – C2e-at and y2 = aC2e-at. Substituting C2e-at = y2/a into the equation for y1 gives the trajectory equation that y1 = C1 – y2/a or y2 = aC1 – ay1. For a fixed value of a, this is the equation for a family of straight parallel lines with a negative slope. (Different lines in the family are determined by the value of the constant C1 which becomes the intercept for the trajectories.) Page 183, problem 7 – Determine the location and type of all the critical points of the equation y’’+ y – y2/2 = 0. (Use linearization of the corresponding system. Show the details of your work.) If we define y1 = y and y2 = y’, we can write this second-order equation as the following system of first-order equations. dy1 f1 ( y1 , y2 ) y2 dt dy2 y12 f 2 ( y1 , y2 ) y1 dt 2 Critical points occur when both f1 and f2 are zero. We can have f1 = 0 only if y2 = 0. However, f1 = 0 gives y12 y f 2 ( y1 , y2 ) y1 y1 1 1 0 2 2 0 y1 2 Thus, we have two possible critical points: y1 = 0 and y2 = 0 and y1 = 2 and y2 = 0. We can linearize a quadratic y2 term by using a Taylor series about y = y0. If f(y) = y2, then f’(y) = 2y and f’’(y) = 2 and all higher derivatives are zero. At the expansion point, y = y0, the function and derivative values are f(y0) = y02, then f’(y0) = 2y0, f’’(y0) = 2. Using these derivatives in the Taylor series form gives the following finite series for y2. f ( y ) y 2 f ( y0 ) f ' ( y0 )( y y0 ) f ' ' ( y0 ) ( y y0 ) 2 2 2 f ( y ) y 2 y02 2 y0 ( y y0 ) ( y y0 ) 2 y02 2 y0 ( y y0 ) 2 y0 y y02 2 The last set of terms, 2y0y – y02 is the linearized form of the quadratic term y2. Applying this to the y22 term that appears in the second differential equation gives the following result. 2 y1,0 y1 y12,0 y12,0 dy2 y12 y1 y1 y1 y1,0 1 dt 2 2 2 We can write our linearized differential equations in a matrix format as follows. November 2 homework solutions ME501A, L. S. Caretto, Fall 2004 Page 4 1 y1 0 0 dy Ay b 2 dt y1,0 1 0 y 2 y1,0 2 We can find the matrix eigenvalues by the usual equation that Det(A – I) = 0. 1 Det ( A I) 2 y1,0 1 0 y1,0 1 y1,0 1 So the eigenvalues will be real if y1,0 is greater than or equal to one. They will be imaginary if y1,0 is less than one. The trace of the A matrix is zero. If we expand the quadratic about the first center at y1 = 0 and y2 = 0 so that y1,0 = 0 then the eigenvalues will be imaginary. This results from a zero trace and a positive determinant. This means that the first critical point is a center. To evaluate the second critical point we have to make a coordinate transformation so that the critical point occurs at (0,0) in the transformed coordinate system. This transformation and its effect on the system of equations are shown below. ~ y1 y1 2 ~ y2 y2 d~ y1 dy1 ~ y2 dt dt 2 ~ d~ y2 dy2 y1 2 ~ y1 2 dt dt 2 The second equation, in the new coordinate system, can be written as follows, where we apply the linearization process to the quadratic term in the final step. ~ ~ y12,0 2 ~ y1,0 ~ y1 ~ y12,0 d~ y2 y12 4 ~ y1 4 ~ ~ y12 ~ ~ ~ ~ y1 2 y1 y1 y1 1 y1,0 dt 2 2 2 2 In matrix notation the transformed equations are written as follows. 0 d~ y A~ y b ~ dt 1 y1,0 1 ~ y1 0 2 0 ~ y1,0 2 y2 ~ We can find the matrix eigenvalues by the usual equation that Det(A – I) = 0. Det ( A I) ~ 1 y1,0 1 2 1 ~ y1,0 0 For this center then, the eigenvalues will be real if 1 ~ y1,0 ~ y1,0 is less than or equal to one. They will be imaginary otherwise. The trace of the A matrix is zero. If we expand the quadratic about the second center where ~ y1,0 was defined to be zero, then the eigenvalues are real. In this case the determinant will be zero, which is the criterion for a saddle point. Thus, the second center is a saddle point. Page 860, problem 11 – Set up Newton’s forward difference formula for the data in problem 5, (1.00) = 1.0000, (1.02) = 0.9888, and (1.04)= 0.9784, and find (1.01),(1.03), and(1.05). The forward difference formula is a special case of the divided difference formula when the spacing in the independent variable, x = h, is a constant. In this case we can write the nth order interpolation polynomial as follows (see equation (14) on page 856 of Kreyszig). November 2 homework solutions p( x) y0 y0r 2 y0 ME501A, L. S. Caretto, Fall 2004 Page 5 r (r 1) r (r n 1) n n y0 k n y0 (r m 1) 2! n! k 0 k! m 1 Here, r = (x – x0)/h and the multiple terms in r(r – 1), etc. provide the division by h usually obtained by the divided difference operation. Here, with even step sizes, these divisions can be incorporated in the final polynomial. The forward difference table is similar to the divided difference table, except that no division by the x values is required. For the data in this problem, the forward difference table is found as follows. k 0 xk 1.00 0yk = yk 1.0000 1 1.02 0.9888 yk 2yk -0.0112 0.0008 -0.0114 2 1.04 0.9784 The forward differences required for the interpolation formula are shown in the shaded cells of the table. Using these differences in the forward difference formula gives the following interpolation formula with r = (x – x0)/h = (x – 1)/.02 for the data here. p( x) 1 0.0112r 0.0008 r (r 1) 1 0.0112r 0.0004r (r 1) 2! For x = 1.01, 1.03, and 1.05, we have r = (x – 1)/.02 = .5, 1.5, and 2.5. Plugging these values of r into the interpolation formula gives the following estimates for the data points. p(1.01) 1 0.0112(0.5) 0.0004(0.5)(0.5 1) 0.9943 p(1.03) 1 0.0112(1.5) 0.0004(1.5)(1.5 1) 0.9835 p(1.05) 1 0.0112(2.5) 0.0004(2.5)( 2.5 1) 0.9735 Page 860, problem 15 – Set up Newton’s divided difference formula for the data in problem 9, erf(0.25) = 0.27633, erf(0,5) = 52050, and erf(1) = 84270 and derive the formula for p 2(x). The divided difference table for these data is shown below. The data in the shaded cells are the coefficients in the divided difference formula. k 0 xk 0.25 yk 0.27633 1 0.50 0.52050 First Second 0.97668 -0.44304 0.64440 2 1.00 0.84270 The divided difference polynomial, a0 + a1(x – x0) + a2(x – x0)(x – x1) = a0 + a1x – a1x0 + a2x2 – a2(x0 + x1)x + a2x0x1 = a2x2 + [a1 – a2(x0 + x1)]x + a2x0x1 – a1x0. Thus the constants in the polynomial are a2 = -0. 44304, a1 – a2(x0 + x1) = 0.97668 – (-0. 44304)(0.25 + 0.50) = 1.30896, and a0 – a1x0 + a2x0x1 = -0. 44304 (0.25)(0.50) – 0. 97668(0.25) = –0.02322. November 2 homework solutions Thus, our polynomial is ME501A, L. S. Caretto, Fall 2004 Page 6 p(x) = -0. 44304x2 + 1.30896x – 0.02322 Page 882, problem 27 – The derivative f’(x) can also be approximated in terms of the first order and higher order differences. 2 f 0 3 f 0 4 f 0 1 f ' ( x0 ) f 0 h 2 3 4 Compute f’(0.4) from this formula using differences up to and including first order, second order, third order and fourth order for f(x) = x4 using h = 0.1. For f(x) = x4 with h = 0.1 and x0 = 0.4, we can construct the forward difference table shown below. k 0 xk 0.4 0yk = yk 0.0256 1 0.5 0.0625 yk 2yk 3yk 4yk 0.0369 0.0302 0.0671 2 0.6 0.1296 0.0132 0.0434 0.1105 3 0.7 0.2401 0.0024 0.0156 0.0590 0.1695 4 0.8 0.4096 We can use the differences shown in the shaded cells to compute the derivative given by the expression in the problem statement. We can compare our results to the correct derivative, f’(x) = 4x3, or f’(0.4) = 0.256. Using only first order differences we get f ' ( x0 ) f 0 0.0369 .3690 . This has an error of h .1 0.1130. With second order differences we get f ' ( x0 ) 1 0.0302 0.0369 0.0218 . This has an 0.1 2 error of –0.0380. Third order differences give f ' ( x0 ) 1 0.0302 0.0132 0.0369 0.2620 . This has an 0.1 2 3 error of 0.0060. f ' ( x0 ) 1 0.0302 0.0132 0.0024 0.0369 0.0256 with fourth order differences. 0.1 2 3 4 This has zero error. When we use a finite-difference expression that has an nth order error, we can take first derivatives of polynomials up to and including order n with no error. Hoffman, page 282, problem 33 – From the data in Table 1 evaluate f’(1.0) using equation (5.99) for x = 0.04, 0.02, and 0.01. (a) Estimate the error for the x = 0.02 result. (b) ) Estimate the error for the x = 0.01 result. (c) Extrapolate the results to O(x4). November 2 homework solutions ME501A, L. S. Caretto, Fall 2004 Page 7 Equation (5.99) in Hoffman is the second-order, central-difference formula for the first derivative, which may be written as follows. f ' ( x0 ) f ( x0 h ) f ( x0 h ) O(h 2 ) 2h The required data from Table 1 are shown below. 0.96 0.98 0.99 1 1.01 1.02 1.04 2.61169647 2.66445624 2.69123447 2.71828183 2.74560102 2.77319476 2.82921701 The results for the three values of x are: x = 0.04 x = 0.02 f ' (1) f ' (1) x = 0.01 2.82921701 2.61169647 2.71900676 2(0.4) 2.77319476 2.66445624 2.71846305 2(0.2) f ' (1) 274560102 2.69123447 2.71823713 2(0.1) Equations (5.116a) and (5.116b) give the error estimates when a finite-difference expression with an nth order error is used to compute an expression at two step sizes: h and h/R, where R is the factor by which the step size is reduced. In this case, our expression has a second-order error, so n = 2 and we reduce the step size by a factor of R = 2. Thus, we can use the data at x = 0.02 and x = 0.01, with equation (5.116a) to estimate the error at x = 0.02 as follows. E ( x 0.02) 22 f ' (x 0.01) f ' (x 0.02) 42.71823713 2.71846305 1.8x104 2 2 1 3 Similarly, we can use the data at x = 0.02 and x = 0.01, with equation (5.116b) to estimate the error at x = 0.01 as follows. E ( x 0.01) 1 f ' ( x 0.01) f ' ( x 0.02) 42.71823713 2.71846305 4.5x105 2 1 3 2 The extrapolated results are given by equation (5.117). Applying this equation to the f’ data for x = 0.01 and x = 0.02 gives. Extrapolated Value 1 f ' (x 0.01) f ' (x 0.02) 42.71823713 2.71846305 2 1 3 2.71823713 2.71846305 2.71823713 2.71828182756 3 f ' ( x 0.01) 2 Since the infinite series for the truncation error for the central difference expression has only even powers, this extrapolation is accurate to O(x4).