Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

A drug administered to a patient produces a concentration in the blood stream gi

ID: 3572747 • Letter: A

Question

A drug administered to a patient produces a concentration in the blood stream given by c(t)=A*t*exp(-t/3) milligrams per milliliter, t hours after A units have been injected. The maximum safe concentration is 1 mg/mL.   
Apply Newton-Raphson method in order to find a numerical solution within 10^-5 to the following:

a. The amount that should be injected to reach the given maximum safe concentration and when does this maximum occur.

b. An additional amount of this drug is to be administered to the patient after the concentration falls to 0.25 mg/mL. Determine, to the nearest minute, when this second injection should be given.   

i need a matlab code for this

Explanation / Answer

A = 2.5;
c = @(t) A*t*exp(-t/3.0);
dc = @(t) A*exp(-t/3.0) - A*t*exp(-t/3.0)/3.0;
tol = 10^-5;
t0 = 0;
while abs(c(t0)-1)>tol
    t1 = t0 - c(t0)/dc(t0);
    t0 = t1;
    %disp(c(t0));
end
disp(['Time for reaching safe limit: ', num2str(t0)]);
t0 = 0;
while abs(c(t0)-0.25)>tol
    t1 = t0 - c(t0)/dc(t0);
    t0 = t1;
end
disp(['Time to administer second injection: ', num2str(t0)]);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote