Develop a well-structured function to compute v as a function of t. Then use this function to generate a table of v versus t for
To calculate: Create a function for the velocity of rocket v that takes t as parameters and test the function on the below piecewise function of velocity from
Answer to Problem 18P
Solution:
The value of v for t is:
Explanation of Solution
time velocity
-5.000000 0.000000
-4.500000 0.000000
-4.000000 0.000000
-3.500000 0.000000
-3.000000 0.000000
-2.500000 0.000000
-2.000000 0.000000
-1.500000 0.000000
-1.000000 0.000000
-0.500000 0.000000
0.000000 0.000000
0.500000 0.250000
1.000000 6.000000
1.500000 17.250000
2.000000 34.000000
2.500000 56.250000
3.000000 84.000000
3.500000 117.250000
4.000000 156.000000
4.500000 200.250000
5.000000 250.000000
5.500000 305.250000
6.000000 366.000000
6.500000 432.250000
7.000000 504.000000
7.500000 581.250000
8.000000 664.000000
8.500000 752.250000
9.000000 846.000000
9.500000 945.250000
10.000000 1050.000000
10.500000 1047.500000
11.000000 1045.000000
11.500000 1042.500000
12.000000 1040.000000
12.500000 1037.500000
13.000000 1035.000000
13.500000 1032.500000
14.000000 1030.000000
14.500000 1027.500000
15.000000 1025.000000
15.500000 1022.500000
16.000000 1020.000000
16.500000 1017.500000
17.000000 1015.000000
17.500000 1012.500000
18.000000 1010.000000
18.500000 1007.500000
19.000000 1005.000000
19.500000 1002.500000
20.000000 1000.000000
20.500000 1025.500000
21.000000 1052.000000
21.500000 1079.500000
22.000000 1108.000000
22.500000 1137.500000
23.000000 1168.000000
23.500000 1199.500000
24.000000 1232.000000
24.500000 1265.500000
25.000000 1300.000000
25.500000 1335.500000
26.000000 1372.000000
26.500000 1409.500000
27.000000 1448.000000
27.500000 1487.500000
28.000000 1528.000000
28.500000 1569.500000
29.000000 1612.000000
29.500000 1655.500000
30.000000 1520.000000
30.500000 1375.352875
31.000000 1244.470745
31.500000 1126.043695
32.000000 1018.886470
32.500000 921.926603
33.000000 834.193687
33.500000 754.809662
34.000000 682.980025
34.500000 617.985883
35.000000 559.176751
35.500000 505.964047
36.000000 457.815202
36.500000 414.248325
37.000000 374.827385
37.500000 339.157843
38.000000 306.882707
38.500000 277.678957
39.000000 251.254310
39.500000 227.344301
40.000000 205.709631
40.500000 186.133771
41.000000 168.420801
41.500000 152.393442
42.000000 137.891289
42.500000 124.769198
43.000000 112.895839
43.500000 102.152379
44.000000 92.431295
44.500000 83.635294
45.000000 75.676344
45.500000 68.474788
46.000000 61.958550
46.500000 56.062414
47.000000 50.727370
47.500000 45.900023
48.000000 41.532058
48.500000 37.579760
49.000000 34.003573
49.500000 30.767705
50.000000 27.839771
Given Information:
The piecewise function of velocity is given below on which the function will be executed from
Calculation:
Code:
function
if
elseif
elseif
elseif
else
end
TestFile.m:
for
end
Output:
Press F5 to run the program.
Want to see more full solutions like this?
Chapter 2 Solutions
Numerical Methods For Engineers, 7 Ed
Additional Math Textbook Solutions
College Algebra (7th Edition)
Intro Stats, Books a la Carte Edition (5th Edition)
Elementary Algebra For College Students (10th Edition)
Elementary Statistics: Picturing the World (7th Edition)
University Calculus: Early Transcendentals (4th Edition)
Algebra and Trigonometry (6th Edition)
- Q1: For, 0 <|z| < 1, evaluate the following integral where g is analyfunction inside and on the unit circle C: α) δε a) Sc 15 αξί b) Sc 9(5) -1/2 d. -2 1.'s integrale عناarrow_forwardQ4: State the Fundamental Theorem of Independent of Path and Morera's Theorem. Why can't apply these theorems to compute the integral contour. zdz, where C is closedarrow_forward18.11. If f(z) is analytic and |f(z)| ≤1/(1-2) in || < 1, show that |f'(0)| ≤ 4.arrow_forward
- SCAN GRAPHICS SECTION 9.3 | Percent 535 3. Dee Pinckney is married and filing jointly. She has an adjusted gross income of $58,120. The W-2 form shows the amount withheld as $7124. Find Dee's tax liability and determine her tax refund or balance due. 4. Jeremy Littlefield is single and has an adjusted gross income of $152,600. His W-2 form lists the amount withheld as $36,500. Find Jeremy's tax liability and determine his tax refund or balance due. 5. 6. Does a taxpayer in the 33% tax bracket pay 33% of his or her earnings in income tax? Explain your answer. In the table for single taxpayers, how were the figures $922.50 and $5156.25 arrived at? .3 hich percent is used. 00% is the same as multi- mber? 14. Credit Cards A credit card company offers an annual 2% cash-back rebate on all gasoline purchases. If a family spent $6200 on gasoline purchases over the course of a year, what was the family's rebate at the end of the year? Charitable t fractions, decimals, and 15. al Percent…arrow_forward1.5. Run Programs 1 and 2 with esin(x) replaced by (a) esin² (x) and (b) esin(x)| sin(x)|| and with uprime adjusted appropriately. What rates of convergence do you observe? Comment.arrow_forwardUse Taylor Series to derive the entries to the pentadiagonal and heptadiagonal (septadiagonal?) circulant matricesarrow_forward
- 1.3. The dots of Output 2 lie in pairs. Why? What property of esin(x) gives rise to this behavior?arrow_forward1.6. By manipulating Taylor series, determine the constant C for an error expansion of (1.3) of the form wj−u' (xj) ~ Ch¼u (5) (x;), where u (5) denotes the fifth derivative. Based on this value of C and on the formula for u(5) (x) with u(x) = esin(x), determine the leading term in the expansion for w; - u'(x;) for u(x) = esin(x). (You will have to find maxε[-T,T] |u(5) (x)| numerically.) Modify Program 1 so that it plots the dashed line corresponding to this leading term rather than just N-4. This adjusted dashed line should fit the data almost perfectly. Plot the difference between the two on a log-log scale and verify that it shrinks at the rate O(h6).arrow_forwardDefine sinc(x) = sin(x)/x, except with the singularity removed. Differentiate sinc(x) once and twice.arrow_forward
- 1.4. Run Program 1 to N = 216 instead of 212. What happens to the plot of error vs. N? Why? Use the MATLAB commands tic and toc to generate a plot of approximately how the computation time depends on N. Is the dependence linear, quadratic, or cubic?arrow_forwardShow that the function f(x) = sin(x)/x has a removable singularity. What are the left and right handed limits?arrow_forward18.9. Let denote the boundary of the rectangle whose vertices are -2-2i, 2-21, 2+i and -2+i in the positive direction. Evaluate each of the following integrals: (a). 之一 dz, (b). dz, (b). COS 2 coz dz, dz (z+1) (d). z 2 +2 dz, (e). (c). (2z+1)zdz, z+ 1 (f). £, · [e² sin = + (2² + 3)²] dz. (2+3)2arrow_forward
- Algebra and Trigonometry (MindTap Course List)AlgebraISBN:9781305071742Author:James Stewart, Lothar Redlin, Saleem WatsonPublisher:Cengage LearningGlencoe Algebra 1, Student Edition, 9780079039897...AlgebraISBN:9780079039897Author:CarterPublisher:McGraw HillFunctions and Change: A Modeling Approach to Coll...AlgebraISBN:9781337111348Author:Bruce Crauder, Benny Evans, Alan NoellPublisher:Cengage Learning
- Algebra for College StudentsAlgebraISBN:9781285195780Author:Jerome E. Kaufmann, Karen L. SchwittersPublisher:Cengage LearningCollege Algebra (MindTap Course List)AlgebraISBN:9781305652231Author:R. David Gustafson, Jeff HughesPublisher:Cengage Learning