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

Suppose a chemical reaction is taking place and the concentration of a particula

ID: 2989715 • Letter: S

Question

Suppose a chemical reaction is taking place and the concentration of a particular ion at time, t, is given by Write an M-file that uses the Bisection method to find when the concentration of the ion will reach half of its initial concentration. The initial concentration at of the ion should be taken when t = 0. Use initial guesses xt = 0 and xu = 10 and a precision of 0.5% Consider the following function: f(x) = x3 - 8x2 - 200x+1000 Write an M-file that will locate the maximum of f(x) for x [-10, 10] by finding the root of the derivative of this function. Use the Newton Raphson method to perform root finding. Select the initial guess yourself after looking at f(x) graphically. Your solution should achieve a precision of 0.01. Plot f'(x) and the root on the same figure. The motion of a projectile can be analysed by considering the horizontal and vertical components. A related problem deals with the trajectory of a thrown ball. The trajectory of a ball is defined by the (x,y) coordinates and can be modelled as: where theta is the throw angle in degrees, v0 is the initial velocity, x is the distance from the thrower to the catcher, y0 is the thrower's elevation (i.e the height of the thrower's hands) and y is the catcher's elevation (i.e the height of the catcher's hands), g is gravity (g = 9.81 ms-2)

Explanation / Answer

f=@(t) 10*exp(-0.1*t)+2*exp(-0.5*t);
xl=0;
xu=10;
err=1;
val=feval(f,0);
while err>=0.005
xc=(xl+xu)/2;
fl=feval(f,xl);
fu=feval(f,xu);
fc=feval(f,xc);
if fc>0.5*val
xl=xc;
else
xu=xc;
end
err=abs(fc-0.5*val);
end
x=['answer is ',num2str(xc)];
disp(x)

  

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