A popular method for curve fitting is the “Least Squared” method.
a) Determine the value of the constant k which best approximates a specified function f(x) on the
interval 𝑎 ≤ 𝑥 ≤ 𝑏. Use as a cost function to be minimized:
∫ [𝑘 − 𝑓(𝑥)]
Verify that a minimum is achieved by checking the 2nd order optimality condition.
b) Determine the optimal value of 𝑘 and 𝐿(𝑘) in fractional form for 𝑓(𝑥) = 𝑥
, 𝑎 = 0, 𝑎𝑛𝑑 𝑏 = 1.
c) For the best linear fit, determine the optimal value of 𝑘, 𝑚 𝑎𝑛𝑑 𝐿(𝑘) in fractional form for 𝑓(𝑥) =
, 𝑎 = 0, 𝑎𝑛𝑑 𝑏 = 1 where,
𝐿(𝑘, 𝑚) =
∫ [𝑚𝑥 + 𝑘 − 𝑓(𝑥)]
Hint: The answers to these problems can be confirmed using MATLAB’s or Excel’s curve fitting.
In part a. we need to solve 𝑑𝐿(𝑘)
These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction
of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice.
Unethical use is strictly forbidden.