Develop a program using a programming or macro language to implement the parabolic interpolation algorithm. Design the program so that it is expressly designed to locate a maximum and selects new points as in Example 13.2. The subroutine should have the following features:
• Base it on two initial guesses, and have the program generate the third initial value at the midpoint of the interval.
• Check whether the guesses bracket a maximum. If not, the subroutine should not implement the algorithm, but should return an error message.
• Iterate until the relative error falls below a stopping criterion or exceeds a maximum number of iterations.
• Return both the optimal x and
• Minimize the number of function evaluations.
Test your program with the same problem as Example 13.2.
![Check Mark](/static/check-mark.png)
Want to see the full answer?
Check out a sample textbook solution![Blurred answer](/static/blurred-answer.jpg)
Chapter 13 Solutions
EBK NUMERICAL METHODS FOR ENGINEERS
- Question 4 List the steps in details to draw the shape below using AutoCAD commands 190 220 50 -90 - 50 114 81 R80 450 122 -R125 68 65 290 50 290 630arrow_forwardPlease show the complete step-by-step solution. Choose the answer from the choices below. I’ll rate you with an upvote later. Thank you.arrow_forwardGIVEN: L1=20 N GIVEN: a= 4m GIVEN: L2= 20 N GIVEN: b= 5m GIVEN: L3=20 N GIVEN: c= 6m GIVEN: L4= 0 N GIVEB: e= 3m GIVEN: L5= 10 N ANSWER: (a) Ax in N (b) Ay in N (c) Ex in N (d) Ey in N PLS SOLVE IN A COMPLETE SOLUTION AND WRITE LEGIBLY AND ALSO DRAW THE FREE BODY DIAGRAMarrow_forward
- Select the graph showing Tmax versus D1 after answering the question.arrow_forwardWrite commands to evaluate the following three mathematical expressions and assign the results to the indicated variable names. 23.2 – 7.1 ÷ 2.2 X = (5.1 – 3.7) × (3.4 + 4.2) Assign the result for x to the variable Answer1. 35.7 x 64.1 – 6.03 y = 43 + 52 Assign the result for y to the variable Answer2. z = (2.1 + 8.0)-1/3 Assign the result for z to the variable Answer3. Be sure to use a MATLAB command to evaluate each mathematical expression rather than just entering the result calculated elsewhere (e.g. a local MATLAB session or on your calculator).arrow_forward8. What are the main stages of the FEM? 9. Make a sketch of a linear triangular finite element. Point the nodes and write the approximating polynomial. 10. Describe with one sentence what the shape functions in FEM are. 11. Special case of which method is the method of Galerkin? 12. What are the three main parts of a FEM program? 13. How can be increased the accuracy of the derivatives for linear finite elements in FEM postprocessor? 14. Specify three methods for force computation in FEM postprocessor.arrow_forward
- 2. Write a MATLAB script that computes the following sum while requesting the value of x and n from the user.arrow_forwardDevelop three mass balance equations for each tank in Figure 1. Solve to determine the concentrations in each tank. Use 'np.linalg.solve' to solve the system of equations you generate. Assume the tanks are at steady-state (i.e. concentration within each tank is not changing with time) and well-mixed (i.e. the concentration flowing out of the tank is equal to the concentration within the tank). Mass can be tracked by multiplying flow rate, Q (L/s) by concentration, c (mg/L) to give mg/s. Hint: for each tank the mass coming in mg/s must equal the mass going out mg/s, set this up like our two reactor example from lecture 6. Note: Volume balances must hold in addition to mass balances. In other words, the Q entering the tank must equal the Q leaving the tank. You can use this principle to find any values for Q that are missing in the figure. 500 mg/s 221c2 21291 Q13c1 2 02392 Q33c3 500 mg/s 33 = 120 13 = 40 212 = 90 23 = 60 21 = 30arrow_forward2. Answer the question completely and write down the given, required and formula that had been used. Provide graph and accurate/comple solution. The value are: V- 1 X- 5 W- 7 Y- 6 Z- 8arrow_forward
- For the equation: a. Secant Method. Use Secant Method to determine the root of the given function up to three iterations use x_1= 0 and xo = 2. Complete the table using the HAND Calculation. Maintain 6 decimal places XH ex = 3 f(x+1) X₁ f(x₁) Eaarrow_forward15. You are part of a team working in a machine parts mechanic's shop. An important customer has asked your company to provide springs with a very precise force constant k. To measure the spring constant, you fasten two of the springs between the ends of two very long wires of length L, separated by the unstretched length l of the springs as shown in Figure P29.15. The specific attachment method that you use insulates the springs from the wires so that no current passes through the springs. You lay the apparatus flat on a table and then pass a current of magnitude I through the wires, in opposite directions. As a result the springs stretch by a distance d and come to equilibrium. You determine an expression for the spring constant in terms of L, I, l, and d. Figure P29.15arrow_forwardPlease solve using matlabarrow_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
![Text book image](https://www.bartleby.com/isbn_cover_images/9780190698614/9780190698614_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9780134319650/9780134319650_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781259822674/9781259822674_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781118170519/9781118170519_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781337093347/9781337093347_smallCoverImage.gif)
![Text book image](https://www.bartleby.com/isbn_cover_images/9781118807330/9781118807330_smallCoverImage.gif)