This document provides study material for the MENG 438 Engineering Analysis course. It includes information on the logistic model and its regression equation, as well as the Euler and Modified Euler methods for solving differential equations.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
Running head: MENG 438 Engineering Analysis MENG 438 Engineering Analysis Name of the Student Name of the University Author Note
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
1MENG 438 Engineering Analysis 1. The regression equation of the logistic model is given by, N(t) =N0∗K N0+(K−N0)∗e−rt N0 = Initial population = population at year 1900 = 3589 K = carrying capacity, r = growth parameter. The logistic model is fitted to Bryan population data from 1900 to 2010 in 10 years interval. The value of K and r of the best fitted model that is the model with minimum sum of square error are calculated in MATLAB and then fitted as given below. The change in the objective function or the logistic equation is below the default value of function tolerance which is 10^(-6) as given in MATLAB. MATLAB code: t = 0:10:110; % time t in years from 1900 p = [3589,4132,6307,7814,11842,18072,27542,33141,44337,55002,65660,76201]; % population of Bryan N0 = 3589; % specifying initial population N0 fun = @(param,t) (N0*param(1))./((N0 + (param(1) - N0).*exp(-param(2).*t))); % specifying logistic model param0 = [1,1]; % initial K and r values are assumed to be 1 lb = [0.01,0.01]; % specifying lower bound for K and r. K>0 and r>0 param_val = lsqcurvefit(fun,param0,t,p,lb,[]); % fitting non-linear logistic model
2MENG 438 Engineering Analysis sprintf('The values of K = %.4f and r =%.4f which satisfies the least square fit',param_val(1),param_val(2)) time = linspace(t(1),t(end)); plot(t,p,'ko',time,fun(param_val,time),'b-') legend('Population','Fitted Logistic model','Location','best') title('Original Population and Fitted logistic Curve') xlabel('Time t in years from 1900') ylabel('Population') Output: leastsqrfit Local minimum possible. lsqcurvefit stopped because the final change in the sum of squares relative to its initial value is less than the default value of the function tolerance. <stopping criteria details> ans = 'The values of K = 124571.8858 and r =0.0362 which satisfies the least square fit'
3MENG 438 Engineering Analysis 020406080100120 Time t in years from 1900 0 1 2 3 4 5 6 7 8 Population 104Original Population and Fitted logistic Curve Population Fitted Logistic model Hence, the value of carrying capacity K = 124571.8858 and r =0.0362 as calculated above. 2. Given, differential equation dx dt=√xt x2+t2 Initial condition is x(0) = 1. f(x,t) =√xt x2+t2 Euler’s method iteration equation: x(i+1) = x(i) + h*f(t(i),x(i)) Modified Euler Method iteration equation:
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
16MENG 438 Engineering Analysis 3. Now, the above differential equation is solved using Simulink as given below by the following block diagram. Plot of Solution x(t):