The sine function can be evaluated by the following infinite series:
Write an algorithm to implement this formula so that it computes and prints out the values of sin x as each term in the series is added. In other words, compute and print in sequence the values for
up to the order term n of your choosing. For each of the preceding, compute and display the percent relative error as
Write the algorithm as (a) a structured flowchart and (b) pseudocode.
Want to see the full answer?
Check out a sample textbook solutionChapter 2 Solutions
EBK NUMERICAL METHODS FOR ENGINEERS
Additional Engineering Textbook Solutions
Basic Technical Mathematics
Advanced Engineering Mathematics
Fundamentals of Differential Equations (9th Edition)
Introductory Combinatorics
Calculus and Its Applications (11th Edition)
- 2 3 4 5 6 1. (Make a MatLab code) Using for loop, write a script that will generate the all following multiplication table at once: 4 6 8 10 12 5 7 9 11 10 14 18 22 10 13 16 20 26 32 17 21 34 42 26 52arrow_forwardI need help with a MATLAB code. I need to find two values of n, one that is positive and one that is negative, that will give all negative real roots. Can you help me find them? function [r] = find_roots(n) % Define constants I = 400; J = 150; x = (J/I) - 1; y = n - 1; Q = y + x*(y-1); % Define the coefficients of the quadratic equation coefficients = [1, 0, (3*x+Q^2+1), 0, (3*x*Q+Q^2)]; % Find the roots r = roots(coefficients); endarrow_forwardQuestion: For The Given 4-DOF Robot: A. Assign Appropriate Frames For The Denavit-... For the given 4-DOF robot: a. Assign appropriate frames for the Denavit-Hartenberg representation. b. Fill out the parameters table. c. Write an equation in terms of A matrices that shows how UTH can be calculated. U # d. a a A1 0-1 A2 1-2 Аз 2 -3 A4 3- Harrow_forward
- What is the error in the following code: x=[1:1:10]; y=[ 21 33 4 56 77 88 990 ; semilogy (x, y,'r--'); vectors must be the same lengths can't draw by semilogy x in not a vector there is no any error matlab (w = [1 0-9; 2 -2 0; 1 2 3]; ). What is the value of x(2,1) ? undefined O 2 O the whole second rowarrow_forwardQ2// Write a MATLAB program that returns the plot of the 2-D space defined by the following equation: Label the x-axis, y-axis, legend, and title to the curve.arrow_forward2. How much money will be accumulated in 20 years from a deposit of $1500 every 6 months if the interest rate is 2.75% per month? Use interpolation to work through your interest rates. S = √₁ + ( x - x ₁) / (ƒ₂- fi) (x₂-x₂) f Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Factor value Figure 2-10 Linear interpolation in factor value tables. axis h₂ $₁ Table Unknown Table Known X₁ Required b Linear assumption Known i orn axis ƒ=f₁ +²c=f₁+d C= barrow_forward
- B= X+3,Z-1,L b) Two of the three direction angles of line QP are B=90 and y=90 degrees. The force F=XZV acts on line AB as shown. F XZV P First generate your data using your ID code A= X,Z-1,L F=XZV=118 A ( 1,0,8) B (4,0, 8) E(-1, 0,8 ) E(-X, Z-1, L) (i) Determine the unit vector of each line, (ii) Determine the Cartesian components of the force F=XZV, (iii) Determine the angle between the two lines, (iv) Determine the moment of F force about point E. (v) Determine the angle between line AB and the y axis.arrow_forwardWhat is the return type of angles function in MATLAB ?arrow_forwardHW 2_2 The volume of a partially-filled spherical tank can be computed as: V = πα 3 (3R – d); where d is the depth of the water in the tank (m) and R is the radius of the tank (m). Given that R=3m, to what depth must the tank be filled so that it holds 30 m³? Write a PYTHON code & implement the bisection algorithm to answer the question correct to 3 sig figs. Plot to select your own initial guesses. Display the answer in an informative sentence, using formatted printing.arrow_forward
- B= X+3,Z-1,L b) Two of the three direction angles of line QP are B=90 and y=90 degrees. The force F=XZV acts on line AB as shown. F XZV First generate your data using your ID code A= X,Z-1,L F=XZV=118 A ( 1,0,8) B (4, 0, 8) E(-1, 0,8 ) E(-X, Z-1, L) (i) Determine the unit vector of each line, (ii) Determine the Cartesian components of the force F=XZV, (iii) Determine the angle between the two lines, (iv) Determine the moment of the F force about point E. (v) Determine the angle between line AB and the y axis.arrow_forwardFind the desired ones by typing randomly two A and B the vector in the form below. A = (A1)ï + (A2)ƒ + (A3)k B = (B1)7+ (B2)7 + (B3)k Vektörel çarpım ĀxB= ? Skaller çarpım Ā.B= ? Şiddeti JÄx B]= ?arrow_forwardCreate the following images in AUTOCAD using web.autocad.com (Take screenshots of your work.) Design 3 6.50 1.50-- 3.50 1.00 1.00 4.00 1.00 1.75 2.75 4.75arrow_forward
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY