Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Colouring And Applications

Authors: Pierre Hansen ,Odile Marcotte

1st Edition

0821819550, 978-0821819555

More Books

Students also viewed these Mathematics questions