ooo TMobile 346 PM 1 89 blackboardwichitaedu Computer Applic

..ooo T-Mobile 3:46 PM 1 89%. blackboard·wichita·edu Computer Applications, ME 325,2016 Spring Computer Applications (ME 325), Hw #6 Due date and time: 2/29, 2:00 pm (before Class Time) Note: PLEASE provide the KEY STEP(S) to reach your solution, otherwise zero credit will be given. 1. (Differentiation) A figure shows a spring-mass system assuming the mass moves only horizontally, ie x-direction. The displacement of the mass (distance from the unstreched spring length) can be predicted by solving the second order differential equation, but bere we simply postulate that the displacement of the mass can be modeled as x(r) = cos(ar) where | is the displacement [m], is the frequency [Isl, and f is the time Is]. We would like to study the displacement, and velocity of the mass for 0S1 3 s. Note that is (kin\'but for the simple treatment we can use - Use A1-0.1 s. The template of the excel sheet is shown below. (a) Caleulate the velocity, w) of the mass using the analytie solution and MS-EXCEL a0SI3 s with every . (b) Calculate the velocity, ), of the mass using forward diference approximation (FDA) and MS. EXCEL at 0SIS29s with every M (c) Repeat part (b) using backward difference approximation (BDA) at 0.1 $15 3 s with every (d) Repeat pan (b) using central difference approximation (CDA), at 0.1 S1 2.9 s with every A. (c) Calculate the relative error for vt) using FDA, BDA, and CDA at-08, 1.2, and 2.8 s Note that the relative error, [in %], can be defined by the absolute difference between the analytic solution and numerical solution divided by the absolute value of the analytic solution. (1) When you use A- 0.05 s, how mach the relative eor will change? Please discuss about the reasoes why it changes?

Solution

x(t) = cos(wt) where w=pi

so x(t)= cos (pi*t)

v(t)= d(x(t))/dt= -pi*sin(pi*t) Analytical velocity

del t = 0.1s

FDA v(t) = (x(t+del t) - x(t))/del t

BDA v(t) = (x(t) - x(t- del t))/ del t

CDA v(t)= (x(t + del t/2) - x(t - del t/2))/ del t

for all the above definitions

x(t) = cos (pi*(t))

x(t+del t) = cos (pi*(t + del t))

x(t - del t) = cos(pi*(t - del t))

and so on

The relative error will be reduced if you use 0.05 as del t. This is because in the approximation of the derivative del t value should ideally be as close to zero as possible. Hence a smaller value of del t will give more accurate values of the numerical derivative leading to smaller errors. For exact value of error the whole computation will have to be repeated with del t =0.05.

t x(t)= cos (pi*t) Analytic v(t)= -pi*sin(pi*t) Numerical v(t) forward Numerical v(t) backward Numerical v(t) central
0 1 0 -0.488942801
0.1 0.95110572 -0.969837733 -1.419015389 -0.488942801 -0.965858386
0.2 0.809204181 -1.844836431 -2.210324507 -1.419015389 -1.83726687
0.3 0.58817173 -2.53943123 -2.785489173 -2.210324507 -2.529011673
0.4 0.309622813 -2.985698706 -3.088264863 -2.785489173 -2.973448066
0.5 0.000796327 -3.139999004 -3.08904358 -3.088264863 -3.127115254
0.6 -0.308108031 -2.987243321 -2.787749172 -3.08904358 -2.974986344
0.7 -0.586882949 -2.542369415 -2.213844787 -2.787749172 -2.531937803
0.8 -0.808267427 -1.848880865 -1.423451708 -2.213844787 -1.841294709
0.9 -0.950612598 -0.974592916 -0.493861336 -1.423451708 -0.970594058
1 -0.999998732 -0.00500093 0.484023025 -0.493861336 -0.004980411
1.1 -0.951596429 0.96508009 1.414575471 0.484023025 0.961120263
1.2 -0.810138882 1.840787317 2.206798619 1.414575471 1.833234371
1.3 -0.58945902 2.536486604 2.783222108 2.206798619 2.526079129
1.4 -0.311136809 2.984146517 3.087478314 2.783222108 2.971902246
1.5 -0.002388978 3.13999104 3.089814461 3.087478314 3.127107322
1.6 0.306592468 2.988780359 2.790002101 3.089814461 2.976517075
1.7 0.585592678 2.545301151 2.217359453 2.790002101 2.53485751
1.8 0.807328623 1.852920609 1.427884417 2.217359453 1.845317878
1.9 0.950117065 0.979345628 0.498778619 1.427884417 0.975327268
2 0.999994927 0.010001848 -0.479102021 0.498778619 0.009960809
2.1 0.952084725 -0.960319999 -1.410131965 -0.479102021 -0.956379703
2.2 0.811071528 -1.836733535 -2.203267134 -1.410131965 -1.829197221
2.3 0.590744815 -2.533535543 -2.780947983 -2.203267134 -2.523140177
2.4 0.312650017 -2.982586759 -3.086683932 -2.780947983 -2.970348888
2.5 0.003981623 -3.13997511 -3.090577504 -3.086683932 -3.127091458
2.6 -0.305076127 -2.990309816 -2.792247952 -3.090577504 -2.978040257
2.7 -0.584300922 -2.548226431 -2.220868494 -2.792247952 -2.537770787
2.8 -0.806387772 -1.856955653 -1.432313503 -2.220868494 -1.849336366
2.9 -0.949619122 -0.984095855 -0.503694637 -1.432313503 -0.980058004
3 -0.999988586 -0.01500274 -0.503694637 -0.014941182
 ..ooo T-Mobile 3:46 PM 1 89%. blackboard·wichita·edu Computer Applications, ME 325,2016 Spring Computer Applications (ME 325), Hw #6 Due date and time: 2/29, 2
 ..ooo T-Mobile 3:46 PM 1 89%. blackboard·wichita·edu Computer Applications, ME 325,2016 Spring Computer Applications (ME 325), Hw #6 Due date and time: 2/29, 2

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site