Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a matlab code to numerically solve the above equation for r using your bisection.m from part (a) within numerical tolerance = 104. Recall that
Write a matlab code to numerically solve the above equation for r using your bisection.m from part (a) within numerical tolerance = 104. Recall that bisection.m in turn calls appropriately defined func.m.
(Thank you!)
(a) Write a MATLAB .m function named bisection.m that computes a real root for any nonlinear equation of the form f(x)=0 within numerical tolerance , where f is continuous in the interval [a,b]. Your MATLAB function bisection.m should take the inputs: a,b,f, and return an approximation for the root xapprox. It is a good practice (but not mandatory) to pass an additional input for maximum number of iterations. The continuous function f should be defined in another MATLAB function func.m. (b) Consider a circular field with center P and radius 1. As shown in the Figure, a goat is tethered at point Q located on the circumference. We want to compute the length of the rope r that allows the goat to graze on exactly one half of the circular field's area (i.e., the goat should be able to graze in the white area shown in the Figure). It can be shown that r solves a nonlinear equation: r2arccos(2r)+arccos(12r2)2r4r2=2 Figure 1: Goat tethered at pointStep 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