预定/报价
AMATH 301 Rahman Coding Project 5
AMATH 301 Rahman Coding Project 5
yet2024-08-15 15:22:12

Multidrug therapy of cancer is starting to show promise of increasing the efficacy of both drugs and de- creasing their potential toxicity. One important issue that arises when designing a multidrug therapy regime is when to administer each drug. A common approach is to administer each drug when the previous drug has just reached its maximum concentration in the body (and is therefore beginning to wear of). Suppose that the concentration of the ?rst drug in the body can be modeled by the function

c(t) = 1.3 (e-t/11 - e-4t/3) ,

where t is the time in hours since the ?rst drug was administered and c(t) is the concentration of the ?rst drug at time t. First plot the curve to ?nd two points between which c(t) has a local maxima (or equivallently c/ (t) has a root). Use the bisection method with the two boundary points you found to ?nd the time, t = t* the second drug should be administered such that jc/ (t* )j < 10-8 . Save the time t* as A1, the concentration c(t* ) as A2, and the error for the root of your derivative of your bisection scheme jc/ (t* )j as A3.

Problem 2

We mentioned in class that Newton’s method can work very slowly when ?nding minima of certain functions. The problem arises when more than one derivative vanishes at the minimum.  Remember that if x*   is the minimum of a smooth function f (x), then f/ (x* ) is zero.  If f// (x* ) is also zero, then Newton’s method will take longer to converge. If f// (x* ) and f/// (x* ) are both zero, then Newton’s method will take longer still. We will explore this phenomenon in the following problem.

In each part, you should use a tolerance of 10-8  and an initial guess of x0  = 2.

(1) The function f (x) = x2 has a minimum atx*  = 0. It is easy to check that f/ (0) = 0 but that f// (0) 0. Use Newton’s method to approximate this minimum. Save the number of iterations it takes, with the initial iteration counting as an iteration, in a variable named A4. Save the ?nal iteration in a variable named A5.

(2) Repeat the process above with f (x) = x500 . Save the number of iterations Newton’s method took in A6 and save the ?nal iteration in A7.

(3) Repeat the process above with f (x) = x1000 .  Save the number of iterations Newton’s method took in A8 and save the ?nal iteration in A9.  (Your ?nal iteration for this and the previous part may look strange, but you should be able to con?rm that f/  is very close to zero for these iterations.)