Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi, please solve PROBLEM 3, and use Problem 1 only for reference as it has been solved already. Please put your answer in MATLAB CODE
Hi, please solve PROBLEM 3, and use Problem 1 only for reference as it has been solved already. Please put your answer in MATLAB CODE. Thank you.
Problem #1: The temperature of a recently manufactured bolt is T(t). It sits in a room that is at temperature of 17C and cools according to Newton's Law of Cooling, beginning at a temperature of TO) = 30. Thus T' = - (T-17), T(0) = 30. (a) Use Euler's method with step size h = 0.5 to find the approximate value of T(3). (b) Repeat part (a), but this time with step size h = 0.2. Problem #1(a): 17.02389745 Problem #1(b): 17.14204278 Problem #3: For this problem, you will need to adapt your code from problem 1. First determine the maximum error in your numerical solution to problem #1 above for h = 0.2 for values of t between 0 and 3 by comparing the numerical solution for each value of t with the exact solution from problem 2. You should find that the maximum error is 0.6967. You are now going to put that code in a while loop to find the maximum error for different step sizes. When using the step size h = 0.2 in (a), the interval [0,3] is partitioned into N = 31.2 = 15 parts. A more accurate answer would be obtained if the interval was partitioned into N = 20 parts with step size 3/N. Starting with N = 16 and increasing the value of N by one each time (and taking h = 3/N) find the first (i.e., smallest) value of N that gives a maximum error that is less than 0.06967 when approximating T(t) for t-values between 0 and 3. (Hint: Create a variable to represent the maximum error, and initiate that with a value of 100. Put your code in a "while loop. While the maximum error is larger than your target, increase N by 1 and redo Euler's method and the maximum error calculation with the new value of N) Problem #3: Problem #1: The temperature of a recently manufactured bolt is T(t). It sits in a room that is at temperature of 17C and cools according to Newton's Law of Cooling, beginning at a temperature of TO) = 30. Thus T' = - (T-17), T(0) = 30. (a) Use Euler's method with step size h = 0.5 to find the approximate value of T(3). (b) Repeat part (a), but this time with step size h = 0.2. Problem #1(a): 17.02389745 Problem #1(b): 17.14204278 Problem #3: For this problem, you will need to adapt your code from problem 1. First determine the maximum error in your numerical solution to problem #1 above for h = 0.2 for values of t between 0 and 3 by comparing the numerical solution for each value of t with the exact solution from problem 2. You should find that the maximum error is 0.6967. You are now going to put that code in a while loop to find the maximum error for different step sizes. When using the step size h = 0.2 in (a), the interval [0,3] is partitioned into N = 31.2 = 15 parts. A more accurate answer would be obtained if the interval was partitioned into N = 20 parts with step size 3/N. Starting with N = 16 and increasing the value of N by one each time (and taking h = 3/N) find the first (i.e., smallest) value of N that gives a maximum error that is less than 0.06967 when approximating T(t) for t-values between 0 and 3. (Hint: Create a variable to represent the maximum error, and initiate that with a value of 100. Put your code in a "while loop. While the maximum error is larger than your target, increase N by 1 and redo Euler's method and the maximum error calculation with the new value of N) Problem #3Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started