MATLAB Restate the problem as an optimization problem. Then:

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

MATLAB Restate the problem as an optimization problem. Then:

Post by answerhappygod »

MATLAB Restate the problem as an optimization problem. Then:
Matlab Restate The Problem As An Optimization Problem Then 1
Matlab Restate The Problem As An Optimization Problem Then 1 (175.88 KiB) Viewed 12 times
1. A seminal breakthrough in HIV treatment was the use of multiple-drug combination therapy. The idea behind the therapy is that multiple drugs, introduced to the body at specific times, fight the virus off better than one drug alone. A key step in the development of multiple-drug therapy is determining the best time to take the next drug. One way this is done is to take the next drug when the previous drug is at its maximum in the body (and beginning to decrease from there). Drug absorption and elimination in the body is modeled using compartmental models. Consider a model whose solution is given by x(t) 10 (e-t/4 3 24 e-1/2), (1) where c(t) is the amount of the drug in the body at time t. Assume that we want to administer the next drug when x(t) is at its maximum. We call this time tmax in what follows. Recall that we have only talked about minimizing functions so you will have to restate the problem as a minimization problem. 1 (a) Find tmax and the maximum of the function x(t) by taking the derivative (by hand) and using fzero (MATLAB) or scipy.optimize.fsolve (Python), with an initial guess of Xo = 2, to find the root of x'(t). Create a 1 x 2 row vector that contains tmax in the in the first component and the maximum in the second component. Save this vector to the variable A1. Note to python users: scipy.optimize.fsolve returns an array, make sure you get the single number out of that array for your answers here. (b) Use fminbnd (MATLAB) or scipy.optimize.fminbound (python) with the interval (0, 12] to find tmax and the maximum of x(t). Create a 2 x 1 column vector that contains tmax in the first component and the maximum in the second component. Save this vector to the variable A2.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply