Question: This is to use Python to solve linear least squares problem. Having a function y = f(t,x)= x1 * exp(x2 * t), we take the

This is to use Python to solve linear least squares problem. Having a function y = f(t,x)= x1 * exp(x2 * t), we take the logarithm of the function and gives log(x1)+x2 * t = log(y), which is now linear in x2. Use linear least squares to compute x1 and x2 in this manner. Note that your linear least squares solution is for log(x1), so you will need to adjust the term you nd to get x1. How to calculate x1 and x2 using Python? I got correct results by directly solve non-linear least squares in Python but kept getting it wrong when trying to solve the linear function.

We have 8 sets of data (t, y):

t| 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0

y| 6.80 3.00 1.50 0.75 0.48 0.25 0.20 0.15

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!