Appearance
question:In class I stated that any 2nd or 3 rd order polynomial that goes through the points 0 1 , 3 y and 1 1 , 3 y would have the same integral over the range -1 to 1 as the line (remember, there is only one) that goes through the same two points. The easiest way to prove that the areas are all the same (and demonstrate why) is using NDDP. First, let’s construct a 1st order NDDP through the points above, and calculate the area under that line for -1 ≤ x ≤ 1. The NDDP equation for the 1 st order polynomial (straight line) that goes through points 0 0,x y and 1 1,x y is: 1 0 0 1 0 0 1 0,f x f x x f x x a a x x It will turn out that we don’t even need to know 0f or 1 0,f x x . They are simply constant values that we can carry around. I’m going to replace them with simpler terms: 1 0 1 0f x a a x x Now let’s integrate this line from -1 to 1: 1 21 0 0 1 0 0 1 1 1 2 line x x A a a x x dx a x a From the 2-point Gauss Legendre, 0 1 3 x . Then 1 2 1 0 1 2 2 1 0 2 2 1 1 0 0 0 1 1 32 1 11 1 1 1 3 32 1 3 1 3 1 2 3 3 1 2 3 3 2 2 2 2 3 33 3 2 2 3 line a A a x x a a a a a a a a Just to recap, this is the area under the curve, between x = -1 and x = +1, of the straight line that goes through points at 0 0,x y and 1 1,x y . In truth, though, this value doesn’t matter. What we do next is what matters. The NDDP equation for the 2nd order (quadratic) polynomial that goes through points 0 0,x y , 1 1,x y , and 2 2,x y is: 2 0 0 1 0 0 1 2 1 0 0 1 0 2 0 1 , , ,f x f x x f x x x x x x f x x x a a x x a x x x x Now let’s integrate this quadratic polynomial from -1 to 1: 1 0 1 0 2 0 1 1 1 1 0 1 0 2 0 1 1 1 1 2 0 1 1 quad line A a a x x a x x x x dx a a x x dx a x x x x dx A a x x x x dx I broke it into two integrals to help you visualize that, to make Aquad = Aline, what has to happen is for the integral of the last term of the NDDP to be zero. Let’s see what it is: 1 1 2 0 1 2 1 1 1 1 3 3diffA a x x x x dx a x x dx 1 31 3 3 2 2 2 2 1 1 11 1 11 0 3 3 3 3 3 3 3 diff x x A a x dx a a Since we did not define the values of 2 2,x y , the 2 nd order NDDP expression above describes every quadratic that goes through points 0 0,x y and 1 1,x y . The above identity proves that the area under the curve from x = -1 to x = +1 for every quadratic that goes through points 0 0,x y and 1 1,x y is equal to the area under the line through the same points and over the same range. To prove that the area under every cubic polynomial is the same as the area under the line, let’s add another generic point 3 3,x y and look at the 3rd order NDDP. 0 0 1 0 0 1 2 1 03 0 1 2 3 2 1 0 0 1 0 2 0 1 3 0 1 2 , , , , , , f x x f x x x x x x f x x x f x x x x x x x f x x x x a a x x a x x x x a x x x x x x The area under this curve, between x = -1 and x = +1, is: 1 0 1 0 2 0 1 3 0 1 2 1 1 1 0 1 0 2 0 1 1 1 1 3 0 1 2 1 cubicA a a x x a x x x x a x x x x x x dx a a x x dx a x x x x dx a x x x x x x dx The first integral is the area under the line, and we already know that the second integral is zero. (a) To show that the area under the cubic polynomial is equal to the area under the straight line, show that the third integral in the above expression is zero (b) To show that this only works for polynomials up to 3 rd order, add another generic point 4 4,x y , express the 4th order NDDP, and integrate it from x = -1 to x = +1. We already know that the integral of the first two terms of the NDDP is the area under the line, and the integrals of the 3rd and 4th terms are zero. Show that the integral of the 5 th term in the NDDP is not zero.
answer:(a) We need to show that the third integral in the expression is zero: ∫[a₂(x-x₀)(x-x₁)(x-x₂)]dx from -1 to 1 Now substituting the values of x₀ = -1/3, x₁ = 1/3, and x₂ = 1: ∫[a₂(x+1/3)(x-1/3)(x-1)]dx from -1 to 1 Splitting the integral into two parts: A = ∫(x+1/3)(x-1/3)(x-1)dx from -1 to 0 B = ∫(x+1/3)(x-1/3)(x-1)dx from 0 to 1 Notice that A and B are symmetric about the y-axis (x = 0), which means that these two integrals have opposite signs and will cancel each other out, making their sum zero: A + B = 0 Therefore, the integral of the third term in the cubic NDDP is indeed zero. (b) Adding a generic point (x₄, y₄), the 4th order NDDP is: f₄(x) = a₀ + a₁(x - x₀) + a₂(x - x₀)(x - x₁) + a₃(x - x₀)(x - x₁)(x - x₂) + a₄(x - x₀)(x - x₁)(x - x₂)(x - x₃) Here, x₀ = -1/3, x₁ = 1/3, x₂ = 1, and x₃ = x₄ To find the integral of the 5th term in the NDDP: ∫[a₄(x+1/3)(x-1/3)(x-1)(x-x₃)]dx from -1 to 1 Let's examine only the term (x-x₃) for now. A = ∫(x - x₃)dx from -1 to 0 B = ∫(x - x₃)dx from 0 to 1 Again, A and B are symmetric about the y-axis (x = 0). However, because we're not squaring (x - x₃) in this case, A and B won't cancel each other out (they'll add up). So, the integral of the 5th term in the NDDP is not zero, proving that this only works for polynomials up to 3rd order.
question:你好
answer:你好,有什么我可以帮助你的吗?
question:你几岁了
answer:我是一个人工智能,并没有具体的年龄和生日,但我是在2021年创建和启用的。
question:你能画画吗
answer:作为一名人工智能,我并不能自己画画,但我可以根据指令或者模型生成一些图像。如果你有需要,我们可以共同进行图像创作或者将你的创意转化为绘画。