Numerical Analysis: refers to the analysis of mathematical problems by numerical means, especially mathematical problems arising from models based on calculus.
Effective numerical analysis requires several things:
Critical Loads for Buckling a Column.
Static Analysis of a Scaffolding
Analysis of Natural Frequencies of a Vibrating Bar.
Stability of frameworks under external forces (bridges, houses, ...). Mostly numerical linear algebra, sometimes differential equations are solved.
Communication/power: (i) Network simulation and (ii) Train and traffic networks.
We will improve our:
Step 1: Enter and the number of terms to use, .
Step 2: Calculate using the Taylor series.
Step 3: Print the result.
Octave and Python are interpreted languages.
First, it assumes the earth is sphere, which is only an approximation. At the equator, the radius is approximately 6,378 km; and at the poles, the radius is approximately 6,357 km.
Next, there is experimental error in determining the radius; and in addition, the earth is not perfectly smooth.
function [x y] = projectile(deg=45, v=30) % v: velocidad inicial g = 9.81; % gravedad theta = deg / 180.0 * pi; % angulo de salida radianes T = 2*v*sin(theta) / g; % tiempo de vuelo t = linspace(0, T, 100); x = v * t * cos(theta); y = v * t * sin(theta) - 0.5 * g * t.^2; endfunction [x, y] = projectile(); plot(x, y)
disp("Malthusian Growth Model\n") Year = 1790:10:1870; Actual = [3929214 5308483 7239881 9638453 12866020 17069453 23191876 31433321 39818449]; Model(1) = 3929214; for i=2:9 Model(i) = Model(i-1)*1.349; endfor disp([Year' Actual' Model' abs((Model - Actual)./Actual)'*100])
Malthusian Growth Model 1790.00000 3929214.00000 3929214.00000 0.00000 1800.00000 5308483.00000 5300509.68600 0.15020 1810.00000 7239881.00000 7150387.56641 1.23612 1820.00000 9638453.00000 9645872.82709 0.07698 1830.00000 12866020.00000 13012282.44375 1.13681 1840.00000 17069453.00000 17553569.01662 2.83615 1850.00000 23191876.00000 23679764.60341 2.10370 1860.00000 31433321.00000 31944002.45001 1.62465 1870.00000 39818449.00000 43092459.30506 8.22235
plot(Year, Actual, '--o'); hold on; plot(Year, Model, ':s'); legend('Censo','Model')
Solution of Discrete Growth Model
There are not many discrete models that have an explicit solution. However, it is easy to solve the discrete Malthusian growth model. From the model above, we see that:
This shows why Malthusian growth is also known as exponential growth. The solution to the model that is given by the equation above is an exponential function with a base of and power representing the number of iterations after the initial population is given.
P0 = 3929214; r = 0.349; for n=0:8 Model(n+1) = (1 + r)^n*P0; endfor plot(Year, Actual, '--o'); hold on; plot(Year, Model, ':s') legend('Censo','Model')
Calculate numerically the following integral: