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

thanks The differential equation that describes basic exponential decay (like ra

ID: 3543014 • Letter: T

Question

thanks

The differential equation that describes basic exponential decay (like radioactive decay) is as follows: dN/dt = - lambda N Where N is the current population and ? is the decay rate. For those who have not taken differential equations but would like to know more...............http://en.wikipedia.org/wiki/Differential equation MATLAB has built-in methods for solving ordinary differential equations like this one. The one that we will be using is called ode45. This function requires three things from the use a secondary function that describes the differential equation to be solved the time over which the integration is to be performed initial conditions for the differential equation (all differential equations require initial conditions for its variables and their derivatives) For this problem the secondary function is: function dN = decay(t, N) lambda = 2.0; %decay constant dN = -lambda*N; %differential equation to be solved by ode45 end Given this information, which of the options below is the correct way to call ode45 with the following inputs: A handle to the secondary function decay Time of integration: 0 to 10 seconds Initial value for N: 1000 [t, N] = ode45(@decay, 1000, [0 10]) [t, N] = ode45 (@decay (t, 1000) , [0 10]) [t, N] = decay(@ode45, [0 10],1000) [t, N] = ode45(@decay, [0 10],1000)

Explanation / Answer

the correct answer is

d) [t,N] = ode45(@decay,[0,10],1000)

by this command you are solving a differential equation decay in the interval [0,10] with initial condition N = 1000 at t = 0


a. is wrong because there is only one value1000 has beeen provided at the place of time interval and two value of initial conditions provided, both of which is not correct.

b. is wrong because only two information is provided instead of three and @decay(t,1000) is not the correct way of writing a function

c. is wrong because place of solver (ode45) and secondary function (@decay) has been swaped.