Construct two types of cubic spline approximation

Assignment Help C/C++ Programming
Reference no: EM132641028

Write a computer program for each problem.

Question 1. Use the lagrange interpolation polynomial that pisses through the following data points:

xi

 -4

-3

-2

-1

0

yi

5

0

3

2

9


to estimate the ue of y at x = -2.5.

2. For the following data set

xi  0

1

2

3

yi  2

3

34

245

(a) construct two types of cubic spline approximation (with the efficient implementation) using the following boundary conditions:
i. f"(xo) = f"(xn) = 0
ii = f"(xo) = f"(x1) and f"(xn) = f"(xn-1)
(b) plot the two cubic splines in the same figure over the interval x  ∈ (0,31 for comparison.

(c) use the above cubic splines to evaluate the y value at x = 2.5.

3. Using the data in the following table to fit a quadratic polynomial to the data:

x,

  0.0

0.2

0.4

0.6

  0.8

1.0

yi

 0.00

1.05

0.85

0.35

 0.10

1.00


namely, find a quadratic polynomial

y = ao + a1x + a2x2

where a0, a1 and a2 are the three coefficients to be determined using the least square approach.

(a) Approach I: form an overdetermined system Ax = b
yt = ao + a1x1 + a2xt2 for 0 ≤  i ≤ 5
then form a square system by multiplying the overdetermined system by AT, the transpose of A, i.e.
ATAx = ATb
which can be solved using LAPACK's LU decomposition routines.

(b) Approach 2: use the following LAPACK routine

void dgels_(char *TRANS ,int *M, int *N, int *NRHS, double *A, int *LDA, double *b, int *LDB, double *WORK, int *LWORK, int *INFO):
to directly solve the overdetermined system.

(c) Approach 3: follow the standard least square procedure to minimize the sum of error square

minimize ε = ∑5t=0(a0 + a1x1 + a2xi2 - yt)2

which can be achieved by setting the partial derivative of ε with respect to a0, a1 and a2 equal to zero:
∂ε/∂a0 = 0

∂ε/∂a1 = 0

∂ε/∂a2 = 0

which forms a 3 x 3 linear system to be solved.

Reference no: EM132641028

Questions Cloud

What amount of the payments received : Fred and Wilma were divorced in year 1 (before 2019). What amount of the payments received in year 3 is income to Wilma
How much should mr heffernan pay each month : If the interest rate on this outstanding balance is 3%, how much should Mr. Heffernan pay each month? Mr. Donald Heffernan, a 35 years old account manager
How is co-ordination achieved in team-based : How is co-ordination achieved in team-based, project-based and process-based structures and what type of capabilities do they support?
What is the role of emotions in ethical reasoning : What is the role of emotions in ethical reasoning? Do companies have a duty to protect their customers' privacy?
Construct two types of cubic spline approximation : Construct two types of cubic spline approximation (with the efficient implementation) using the following boundary conditions
How does the watson quote mirror the ideas : How does the Watson quote mirror those ideas? How can you identify, remain consistent, and practice sustainability in your ally development?
Minimize the risk of failure of cancer product : What kind of mechanisms or strategies are needed to minimize the risk of failure of cancer product in case consumer rejects it?
What the heffernan total monthly income is : What the Heffernan's total monthly income is? Mr. Donald Heffernan, a 35 years old account manager At Wells Fargo has gross annual income
Provide the adjusting entry required : Boot Camp Co. (BCC) is about to close its December 31, 2020 financial year-end. For each situation, provide the adjusting entry(ies) required

Reviews

len2641028

9/23/2020 3:22:59 AM

Please find the attached. Use C Language. I need Code and Result in Word Document for each question.

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd