
roots that are repeated more than one time in the factorization. More specifically, if r 1, r 2, …, r n are these roots then we can factor the polynomial as follows

If the value inside the square root symbol is negative, then both roots are imaginary, while if the value inside the square root symbol is non-negative then both roots are real.īy the Fundamental Theorem of Algebra, not only does every n th degree polynomial have n roots, but we can use these roots as a factorization of the polynomial. The roots of a quadratic polynomial a 2 x 2 + a 1 x + a 0 are given by the quadratic formula, namely If a + bi is a real number then the definition of absolute value given above agrees with the ordinary definition since | a| = Note that a complex number a + bi is real if b = 0. Since a and b are real numbers, not involving, we only need to deal with real numbers. If z = a + bi then the absolute value of z is defined by | z| =.If a + bi is a root of an n th degree polynomial, then so is its conjugate a – bi.All complex numbers can be expressed in the form a + bi where a and b are real numbers a is called the real part and b is called the imaginary part.We now give three properties of complex numbers, which will help us avoid discussing imaginary numbers in any further detail: The class of all numbers which include real numbers and imaginary numbers is called complex numbers For example, the equation x 2 + 1 has the roots i and – i as can be seen by substituting either of these values for x in the equation x 2 + 1 = 0. Unfortunately, not all of these roots need to be real some can involve “imaginary” numbers such as, which is usually abbreviated by the letter i. Thus, 1 and -1 are the roots of the polynomial x 2 – 1 since 1 2 – 1 = 0 and (-1) 2 – 1 = 0.īy the Fundamental Theorem of Algebra, any n th degree polynomial has n roots. The polynomial is linear if n = 1, quadratic if n = 2, etc.Ī root of the polynomial is any value of x which solves the equation I = IIf(x >= xin(n), n - 1, Application.For some non-negative integer n (called the degree of the polynomial) and some constants a 0, …, a n where a n ≠ 0 (unless n = 0). 'now evaluate spline at desired value of x ReDim yt(1 To n) As Double 'these are the 2nd deriv values ' Next check to be sure that "input" # points = "output" # pointsĬubicSpline = "Number of known x and y values don't match!" If they aren't, then errors in the function could occur.ĭim p As Double, qn As Double, sig As Double, un As Doubleĭim h As Double, b As Double, a As Doubleĭim xin() As Double, yin() As Double, u() As Double, yt() As DoubleĬase "Integer()", "Double()", "Variant()" 'Note: The known x values must be in ascending order. 'Purpose: Given a set of known x and y values, this function will smoothly interpolate a y value for a specified x ' Revised by Brad Yundt 1/14/10 to handle variant inputs, use proper variable declarations It's two different functions, so you can use the cubic spline bit by itself if you like.įunction CubicSpline(Xknown As Variant, Yknown As Variant, x As Double) Here is a sample workbook where I was using a cubic spline function together with Simpson's rule to perform an integration.


#Excel solver function for finding roots code
Would a user-defined function for a cubic spline be of interest? Code for one is posted at
