Write MATLAB scripts to solve problem 5.21 from the textbook (bisection, specific heat) four times: a) with...

90.2K

Verified Solution

Question

Mechanical Engineering

Write MATLAB scripts to solve problem 5.21 from the textbook(bisection, specific heat) four times:

a) with the bisection method (starting interval [0, 1200])

b) with the false-position method (starting interval [0,1200])

c) with the Newton-Raphson method (x0 = 0)

d) with the secant method ((x0, x1) = (0, 1))

use percent relative error = 10^-6 as stopping criterion.

5.21-Mechanical engineers, as well as most other engineers, usethermodynamics extensively in their work. The following polynomialcan be used to relate the zero-pressure specific heat of dry aircp kJ/(kg K) to temperature (K):

cp = 0.99403 + 1.671 ×10?4T + 9.7215 ×10?8T2 ?9.5838 ×10?11T3 + 1.9520 ×10?14T 4

Develop a plot of cp versus a range ofT = 0 to 1200 K, and then determine the temperature thatcorresponds to a specific heat of 1.1 kJ/(kg K).

Answer & Explanation Solved by verified expert
4.1 Ratings (564 Votes)
Matlab codetxtformat1bisectionmPart 1Bisection Methodto apply Bisection Method fafb0errorchoose another interval for roots findingelseif fafbtorss1if myfunamyfunctoriiii1if myfunamyfuncaccurikik1arramyfunamyfundiffayvalabsmyfunaendendPrinting rootsfprintfthe approximate    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students