Online Homework System Assignment Worksheet
3/14/22 - 12:41:57 PM CET
 

Name: ____________________________ Class:
Class #: ____________________________ Section #: ____________________________
Instructor: Richard Dwight Assignment: AE2220-I Partial exam #2 14 March



Question 1: (1 point)

The function f(x)=e2x+2x24 is approximated with least-squares regression, based on 21 samples of f at x={0,1,2,,20}.  The regressor is a linear combination of the following 6 basis functions:

φ0(x)=1,φ3(x)=ex
φ1(x)=x,φ4(x)=e2x
φ2(x)=x2,φ5(x)=sinx
What is the error in the regressor at x=1/2?

(a)

0.0006

(b)

0.0003

(c)

0.0004

(d)

0.0001

(e)

0.0002

(f)

0

(g)

0.0005

 





Question 2: (1 point)

Consider i) interpolation and ii) regression of a two-dimensional function f(x) where f:R2R.  Assume that the approximating function p(x) in both cases is a linear combination of N distinct basis functions ϕi(x), and that f is sampled at M distinct locations.  The interpolation conditions for i) lead to a system of linear equations, with system matrix A.

Consider the existence and uniqueness of solutions to these two problems.  What condition is required on i) and ii) respectively, to guarantee unique solutions for each problem?

(a)

i) Radial basis functions ϕi, and ii) polynomial ϕi.

(b)

i) A invertable, and ii) A symmetric.

(c)

i) When det(A)0, and ii) det(ATA)0.

(d)

i) When det(A)0, and ii) det(ATA)0.

(e)

i) Polynomial ϕi, and ii) polynomial ϕi.

(f)

i) When M=N, and ii) when MN.

 





Question 3: (1 point)

 

A cubic spline with natural boundary-conditions is used to intepolate only two data-points, (x0,f0) and (x1,f1), resulting in an interpolant s(x).  Which one of the following statements is true?

(a)

s(x) is zero everywhere

(b)

s(x) is not unique

(c)

s(x) is a straight line

(d)

s(x) is independent of f0,f1

(e)

s(x) is not differentiable

(f)

s(x) is not differentiable

 

 





Question 4: (1 point)

 

We interpolate the function f(x,y)=x2+y2 using square elements (patches) from a uniform grid with spacing of 1 along both axes, with a node at the origin -- i.e. (xi,yj)=(i,j), i,j{0,,N}.  We use the polynomial basis (1,x,y,xy) on each of these square elements.  Let the resulting approximation to f(x,y) be s(x,y).  What is s(x,0) on the interval [0,N] equal to?  [Let X=(i,f(i,0)) for i{0,,N} be the data (nodes and values) along the x-axis.]

(a)

The quadratic regressor of X

(b)

The cubic spline interpolating  X

(c)

The radial-basis interpolant of X, with φ(r)=|r|2

(d)

The linear spline interpolating X

(e)

The linear regressor of X

(f)

Exactly f(x,0)

(g)

The radial-basis interpolant of all the data, with φ(r)=|r|

 

 





Question 5: (1 point)

 

We attempt to approximate the function f(x)=x2 using samples at the nodes xi=[10,0,10] with an interpolant of the form

s(x)=a1ϕ(r1)+a2ϕ(r2)+a3ϕ(r3),ϕ(r)=11+(ϵr)2,


where ri:=|xxi| and ϵ=1000. Which of the following relations is/are true?

 

I: a3=a1

II: a20
III: s(100)0

 

(a)

I,II

(b)

II,III

(c)

II

(d)

III

(e)

I

(f)

I,III

(g)

All

 

 





Question 6: (1 point)

 

For a sufficiently smooth function f(x), consider the two finite-difference formulae approximating f(0):

 

f(0)=f(h)2f(0)+f(h)h2+O(hp)

f(0)=f(h)f(h)2h+O(hq)

What are the constants p and q?

(a)

p=2, q=1

(b)

p=1, q=0

(c)

p=1, q=2

(d)

p=1, q=1

(e)

p=2, q=2

(f)

p=0, q=0

(g)

p=0, q=1

 

 





Question 7: (1 point)

Apply the forward-difference scheme:

F(x)=f(x+h)f(x)hf(x)

to evaluate the derivative of a 2nd-degree polynomial

f(x)=ax2+bx+c.

For any choice of step-size h, which one of the following is true of the error ϵ:=f(x)F(x)?

(a)

ϵ>0

(b)

ϵ<0

(c)

ϵ=0

(d)

ϵ>0 for a<0

(e)

ϵ>0 for b<0 

(f)

ϵ>0 for a>0

(g)

None of the above.

 





Question 8: (1 point)

 

Consider quadrature rules for the unit triangle (denoted ), with nodes at its corners, namely: x0=(0,0), x1=(1,0), x2=(0,1).  The rules are of the form:

f(x)dxw0f(x0)+w1f(x1)+w2f(x2)


for some weights wi.  Shape functions for this triangular patch are p0(x,y)=1xy, p1(x,y)=x and p2(x,y)=y, which take the value 1 at the corresponding node, and 0 at all other nodes.  Given this information, what values of the weights (w0,w1,w2) integrate all functions of the form f(x)=a+bx+cy on  exactly?

(a)

(14,14,14)

(b)

(13,112,112)

(c)

(14,18,18)

(d)

(12,12,12)

(e)

(12,14,14)

(f)

(13,13,13)

(g)

(16,16,16)

 

 





Question 9: (1 point)

 

In statistics, weighted integrals of functions f(x) are of interest, for example

I[f]:=f(x)ex2dxi=0Nwif(xi)=:QN[f]


which is approximated by a quadrature rule in the standard form in the above equation.  Suppose that N=2 and the nodes are x=(x0,x1,x2)=(1,0,1).  What weights (w0,w1,w2) lead to the quadrature rule being exact for all polynomials of degree 2 and less?  [Note: ex2dx=π and x2ex2dx=π/2.]

(a)

(π/3,2π/3,π/3)

(b)

(π/3,2π/3,π/3)

(c)

(π/4,π/2,π/4)

(d)

(π/2,0,π/2)

(e)

(π/4,π/2,π/4)

(f)

(π/3,2π/3,π/3)

(g)

(π/4,π/2,π/4)

 

 





Question 10: (1 point)

Until now we have considered quadrature rules that integrate polynomials of degree d exactly.  Using the same principles derive a quadrature rule that integrates the functions ϕ=[1,sin(x),cos(x)] exactly on the interval x[0,π2].  For nodes use x=(0,π4,π2).  What are the corresponding weights?

(a)

w=(0.124,1.336,0.124)

(b)

w=(0.267,1.036,0.267)

(c)

w=(0.267,1.036,0.267)

(d)

w=(0.267,0,0.267)

(e)

w=(1,1.036,1)

(f)

w=(0,1.036,0)

(g)

w=(0.124,1.336,0.124)

 




Build Number : 0482871