I need to find the exponential function y = c0e^(c1*x) using fit in Mathematica for the data points {1850, 1.3}, {1900, 1.6}, {1950, 3.0}, {1980, 4.4}, {2000, 6.0}}.
Asked
Active
Viewed 52 times
0
-
data = {{1850, 1.3}, {1900, 1.6}, {1950, 3.0}, {1980, 4.4}, {2000, 6.0}}; fit = FindFit[data, a Exp[b x], {a, b}, x] – Kassidy Moy Mar 02 '21 at 17:51
-
I tried that code! – Kassidy Moy Mar 02 '21 at 17:51
1 Answers
0
Try this
data = {{1850, 1.3}, {1900, 1.6}, {1950, 3.0}, {1980, 4.4}, {2000, 6.0}};
f = a Exp[b (x/1850-x0)];
fit = FindFit[data, f, {a, b, x0}, x];
fit0 = f /. fit // Simplify
gr0 = ListPlot[data, PlotStyle -> Red];
gr1 = Plot[fit0, {x, 1850, 2000}];
Show[gr1, gr0]
so the adjust is
$$ y = 0.330376 e^{22.8667 \left(\frac{x}{1850}-0.955521\right)} $$
or also
$$ y = 1.0711413556895699\times 10^{-10}e^{0.0123604 x} $$
Cesareo
- 33,252
-
data = {{1850, 1.3}, {1900, 1.6}, {1950, 3.0}, {1980, 4.4}, {2000, 6.0}}; f = a Exp[b (x/1850-x0)]; fit = FindFit[data, f, {a, b, x0}, x]; fit0 = f /. fit;
when I coded this out I didn't get the coefficeints of c and c1
– Kassidy Moy Mar 02 '21 at 18:35 -
$c_0 = 1.0711413556895699\times10 ^{-10}$ and $c_1 = 0.012360370484277862$ You should simplify. – Cesareo Mar 02 '21 at 19:31
