Appendix A. Cubic Spline

Similar documents
MA2501 Numerical Methods Spring 2015

Numerical interpolation, extrapolation and fi tting of data

APPENDIX B GRAM-SCHMIDT PROCEDURE OF ORTHOGONALIZATION. Let V be a finite dimensional inner product space spanned by basis vector functions

Chapter 4: Interpolation and Approximation. October 28, 2005

Q 0 x if x 0 x x 1. S 1 x if x 1 x x 2. i 0,1,...,n 1, and L x L n 1 x if x n 1 x x n

MATH 1014 Tutorial Notes 8

Data Analysis-I. Interpolation. Soon-Hyung Yook. December 4, Soon-Hyung Yook Data Analysis-I December 4, / 1

x x2 2 + x3 3 x4 3. Use the divided-difference method to find a polynomial of least degree that fits the values shown: (b)

Answers to Homework 9: Numerical Integration

Kevin James. MTHSC 206 Section 12.5 Equations of Lines and Planes

COS 424: Interacting with Data

Rewriting Absolute Value Functions as Piece-wise Defined Functions

SPLINE INTERPOLATION

Taylor Series and Numerical Approximations

CONTROL POLYGONS FOR CUBIC CURVES

Lagrange Multipliers Method

In practice one often meets a situation where the function of interest, f(x), is only represented by a discrete set of tabulated points,

Section 5.5 More Integration Formula (The Substitution Method) 2 Lectures. Dr. Abdulla Eid. College of Science. MATHS 101: Calculus I

Preface. 2 Linear Equations and Eigenvalue Problem 22

Introduction Linear system Nonlinear equation Interpolation

Chapter 2. Deriving the Vlasov Equation From the Klimontovich Equation 19. Deriving the Vlasov Equation From the Klimontovich Equation

16.4. Power Series. Introduction. Prerequisites. Learning Outcomes

MATH3283W LECTURE NOTES: WEEK 6 = 5 13, = 2 5, 1 13

CURVE FITTING LEAST SQUARE LINE. Consider the class of linear function of the form. = Ax+ B...(1)

Chapter 5 HIGH ACCURACY CUBIC SPLINE APPROXIMATION FOR TWO DIMENSIONAL QUASI-LINEAR ELLIPTIC BOUNDARY VALUE PROBLEMS

1 3 µ2 p ν (τ ν ) = I ν. s ν (τ ν ) + (1) µ dq ν. dτ ν. and. = Q ν {( 1 µ 2) p ν (τ ν ) }, (2)

ECONOMICS 207 SPRING 2006 LABORATORY EXERCISE 5 KEY. 8 = 10(5x 2) = 9(3x + 8), x 50x 20 = 27x x = 92 x = 4. 8x 2 22x + 15 = 0 (2x 3)(4x 5) = 0

MATHEMATICS Lecture. 4 Chapter.8 TECHNIQUES OF INTEGRATION By Dr. Mohammed Ramidh

Calculus I Announcements

Stress analysis of a stepped bar

h p://edugen.wileyplus.com/edugen/courses/crs1404/pc/b03/c2hlch...

Lecture 7: Interpolation

Block Circulant and Toeplitz Structures in the Linearized Hartree Fock Equation on Finite Lattices: Tensor Approach

Edexcel GCE Further Pure Mathematics (FP1) Required Knowledge Information Sheet. Daniel Hammocks

Fourier series

Cubic Splines; Bézier Curves

Quartic Equation. By CH vd Westhuizen A unique Solution assuming Complex roots. Ax^4 + Bx^3 + Cx^2 + Dx + E = 0

Lecture 9 Approximations of Laplace s Equation, Finite Element Method. Mathématiques appliquées (MATH0504-1) B. Dewals, C.

Differential equations

Examination paper for TMA4110 Matematikk 3

1. Solve the boundary-value problems or else show that no solutions exist. y (x) = c 1 e 2x + c 2 e 3x. (3)

6.1. Linearized Wave Equations in a Uniform Isotropic MHD Plasma. = 0 into Ohm s law yields E 0

Math 578: Assignment 2

How to write proofs - II

There is a unique function s(x) that has the required properties. It turns out to also satisfy

AP Calculus BC Syllabus Course Overview

A = 3 1. We conclude that the algebraic multiplicity of the eigenvalues are both one, that is,

2326 Problem Sheet 1. Solutions 1. First Order Differential Equations. Question 1: Solve the following, given an explicit solution if possible:

Preliminary Examination in Numerical Analysis

14.9 Worked Examples. Example 14.2 Escape Velocity of Toro

Polynomial Functions. x n 2 a n. x n a 1. f x = a o. x n 1 a 2. x 0, , a 1

CURVE FITTING LEAST SQUARE LINE. Consider the class of linear function of the form

Bayes Rule for Minimizing Risk

(2) Dividing both sides of the equation in (1) by the divisor, 3, gives: =

Fixed point iteration and root finding

We consider the problem of finding a polynomial that interpolates a given set of values:

Lecture 10 Polynomial interpolation

Roots and Coefficients Polynomials Preliminary Maths Extension 1

Physics 6303 Lecture 2 August 22, 2018

3.1 Interpolation and the Lagrange Polynomial

In the derivation of Optimal Interpolation, we found the optimal weight matrix W that minimizes the total analysis error variance.

2017 HSC Mathematics Extension 1 Marking Guidelines

2 Two-Point Boundary Value Problems

1 Piecewise Cubic Interpolation

17.2 Nonhomogeneous Linear Equations. 27 September 2007

Appendix A Numerical Tables

Dirichlet in the Upper-Half Plane

Ten years analysis of Tropospheric refractivity variations

Logarithmic Functions

Newton s Method and Linear Approximations

Matrix assembly by low rank tensor approximation

MTH5112 Linear Algebra I MTH5212 Applied Linear Algebra (2017/2018)

The coordinates of the vertex of the corresponding parabola are p, q. If a > 0, the parabola opens upward. If a < 0, the parabola opens downward.

WORD: EXAMPLE(S): COUNTEREXAMPLE(S): EXAMPLE(S): COUNTEREXAMPLE(S): WORD: EXAMPLE(S): COUNTEREXAMPLE(S): EXAMPLE(S): COUNTEREXAMPLE(S): WORD:

Lesson 5: The Graph of the Equation y = f(x)

Finding an upper limit in the presence of an unknown background

Applied Numerical Analysis Quiz #2

Lagrange Interpolation and Neville s Algorithm. Ron Goldman Department of Computer Science Rice University

QUINTIC SPLINE SOLUTIONS OF FOURTH ORDER BOUNDARY-VALUE PROBLEMS

College Algebra. Course Text. Course Description. Course Objectives. StraighterLine MAT101: College Algebra

Memoirs on Differential Equations and Mathematical Physics

G: Uniform Convergence of Fourier Series

5.1 introduction problem : Given a function f(x), find a polynomial approximation p n (x).

OBJECTIVES Use the area under a graph to find total cost. Use rectangles to approximate the area under a graph.

Solving Quadratic Equations Using the Quadratic Formula

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation

Representation: Fractional Splines, Wavelets and related Basis Function Expansions. Felix Herrmann and Jonathan Kane, ERL-MIT

2017 VCE Mathematical Methods 2 examination report

THE USE OF KALMAN FILTRATION TO ESTIMATE CHANGES OF TRUNK INCLINATION ANGLE DURING WEIGHTLIFTING 1. INTRODUCTION

Systems of Linear Equations

Applied Numerical Analysis Homework #3

NONLINEAR CIRCUITS XXI. Prof. E. A. Guillemin Prof. H. J. Zimmermann T. E. Stern Prof. S. J. Mason J. Gross R. D. Thornton RESEARCH OBJECTIVES

MATH 250 REVIEW TOPIC 3 Partial Fraction Decomposition and Irreducible Quadratics. B. Decomposition with Irreducible Quadratics

Chapter 3 Interpolation and Polynomial Approximation

The integral test and estimates of sums

Ch. 7 Absolute Value and Reciprocal Functions Notes

MCPS Algebra 2 and Precalculus Standards, Categories, and Indicators*

Quantum Chemistry Exam 2 Solutions

SOLUTIONS TO EXAM 2, MATH 10550

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ).

Transcription:

Numerical Simulation of Space Plasmas (I [AP-4036] Appendix A by Ling-Hsiao Lyu April 017 Appendix A Cubic Spline We can write the piece-wise continuous function f cubic spline in the following fm: f (x f (x (x +1 (x +1 + f (x +1 (x (x +1 + [a (x (x +1 + b ](x (x +1 (x +1 (A1 The constants {a, b, f 1 n 1} are chosen such that the matching conditions f cubic spline can be fulfilled, ie, and d f (x 1 x x dx d f (x x x +1 dx x x x x d f (x 1 x x d f (x x x +1 d d x x x x One can obtain the following two types of recursion fmula: f 1 + f [ + 1 ]+ f (x +1 1 3 f h 0 (x 1 + ( 1 (A f 1 + f [ + ]+ f (x +1 6 [ f 1 1 h 0 (x f 0 1 ] 1 (A3 where f 0 [ f (x +1 f (x ] / [x +1 ] and x +1 As we can see from equations (A and (A3, the coefficients on the left-hand side depend only on the distribution of grids F a given tabulate data set: { (x, f 1 n }, we can solve equation (A (A3, and evaluate the first and the second derivatives f and f at each grid x, as well as the constants {a, b, f 1 n 1}, based on given boundary conditions at and We can also evaluate the integration value, ie, the area under the cubic-spline curve, Area f (xdx This integration value is useful in inetic plasma simulation to determine mass density, charge density, current density, and thermal pressure at each grid point Exercise A1 Verify Equation (A and Equation (A3 A-1

Numerical Simulation of Space Plasmas (I [AP-4036] Appendix A by Ling-Hsiao Lyu April 017 Verifying Equation (A Let f ( x f 1 x + f x + (x (x (ax + b (1 where f 1 f ( and f f ( To express the undetermined constants, a and b, in terms of the first derivative of f (x at x and x, we tae derivative of Eq (1 It yields f f ( x f + [(x + (x ](ax + b + (x (x a ( Let f 1 f ( and f f ( It yields and f f 1 f + ( (a + b (3 f f f + ( (a + b (4 Solving Eqs (3 and (4 f the unnown constants, a and b, it yields f a 1 + f ( f f 1 ( (5 3 b 1 f 1 f 1 + f ( (x + x + f f 1 1 ( (x + x (6 3 1 Substituting Eqs (5 and (6 into Eqs (3 and (4 to eliminate a and b, it yields Thus, and f ( x f 1 x + f x + (x (x {(x x ( f 1 + (x f f [(x + (x ]} f ( x f + (x (x ( f ( 1 + f f + [(x x + (x x ] 1 {(x x ( f 1 + (x f f f 1 [(x + (x ]} f ( x [(x + (x ] ( f ( 1 + f f + ( {(x x f + (x x f f f 1 1 1 [(x + (x ]} A- (7 (8 (9

Numerical Simulation of Space Plasmas (I [AP-4036] Appendix A by Ling-Hsiao Lyu April 017 Eq (9 can be written as f ( x ( { f [(x x + (x x ]+ f [(x x + (x x ] 1 1 1 3 f [(x + (x ]} (10 Let f 1 f ( and f f ( Eq (10 yields Liewise, f f (x 0 x f 0 x x 0 + f 1 x f 1 4 f f 1 + 6 f f 1 ( (11 f f + 4 f 1 6 f f 1 ( (1 + (x (x {(x x ( 1 f 0 + (x f 1 f 0 [(x + (x ]} it yields f 0 4 f f 0 1 + 6 f 0 ( (13 Eqs (11 and (14 yields f 1 f + 4 f 0 1 6 f 0 ( (14 f 0 1 1 f + ( + f 1 + f 3[ 1 f 0 ( + f f 1 ( ] (15 Let x +1 and ( f 0 ( f +1 f / (x +1 Eq (15 yields 1 f 1 + ( 1 + 1 f + 1 f +1 3[ ( f 0 1 + ( f 0 ] (16 1 1 1 f 1 + ( 1 +1 f + 1 f +1 3[( f 0 1 + 1 ( f 0 ] (17 A-3

Numerical Simulation of Space Plasmas (I [AP-4036] Appendix A by Ling-Hsiao Lyu April 017 Case 1: Step 1: Determine { f, f n 1} from a tabulate data set { (x, f 1 n } with fixed boundary conditions of f at x and x Given f ( and f (, equation (A can be rewritten as f B + f +1 C 1 + C f 1 f 1 + f B + f +1 C 1 + C f 1 + f B 1 + C f +1 C f f 3 n f n 1 (A4 B C 0! 0 1 B 3 C 3 0 0 1 B n C n 0! 0 1 B n 1 f ( f (x 3 f ( f ( + ( C f ( ( + (x 3 C 3 ( 3 + ( C n ( + C n 1 f ( C n 1 (A4' where B ( + 1, C 1, f n 1 Equation (A4 (A4' is the governing equation of { f, f n 1} with a fixed boundary condition of f at x and x Step : Evaluate { f, f 1 n}, {a, b, f 1 n 1}, and Area f (xdx from the results obtained in step 1 Using the matching conditions f the cubic spline, we can show that f 1 n 1, we have a [ f +1 + f f 0 ] b [ f 0 f ] f ( / [ f f +1 ] (A5 (A6 (A7 f n, we have f ( ( / h n 1 [ f + f ( ] (A8 The area under the cubic spline curve between x, is given by A-4

Numerical Simulation of Space Plasmas (I [AP-4036] Appendix A by Ling-Hsiao Lyu April 017 x f (x dx (x +1 [ f (x + f (x +1 a 1 b +1 6 ] (A9 x The Area f (xdx can be obtained by summation of equation (A9 over all intervals Case : Step 1: Determine { f, f 1 n 1} from a tabulate data set { (x, f 1 n } with periodic boundary conditions: f ( f (, f ( f (, and f ( f ( Since f ( f (, we have f 0 (x 0 f 0 Given periodic boundary conditions: f ( f ( and f ( f (, equation (A can be rewritten as f + f B + f +1 C + C f 1 + f B + f +1 C 1 + C f 1 + f B + f ( C 1 + C f 1 f n f n 1 (A10 B 1 C 1 0 0 1 1 B C! 0 0!!! 0 0! 1 B n C n C n 1 0 0 1 B n 1 f ( f ( f ( f + ( C 1 ( + ( C ( 3 + ( C n ( + C n 1 (A10' where B ( + 1, C 1, f 1 n 1 Equation (A10 (A10' is the governing equation of { f, f 1 n 1} with periodic boundary conditions: f ( f ( and f ( f ( Step : Step in Case is the same as Step in Case 1 A-5

Numerical Simulation of Space Plasmas (I [AP-4036] Appendix A by Ling-Hsiao Lyu April 017 Case 3: Step 1: Determine { f, f n 1} from a tabulate data set { (x, f 1 n } with fixed boundary conditions of f at x and x Given f ( and f (, equation (A3 can be rewritten as f B + f +1 C (6 / 1 [ f 0 f 0 1 ] f ( f 1 + f B + f +1 C (6 / 1 [ f 0 f 0 1 ] f 1 + f B (6 / 1 [ f 0 f 0 1 ] f ( C f f 3 n f n 1 (A11 B C 0! 0 1 B 3 C 3 0 0 1 B n C n 0! 0 1 B n 1 f ( f (x 3 f ( f (6 / h 1 [ f 0 ( f 0 ( ] f ( (6 / h [ f 0 (x 3 f 0 ( ] (6 / h n 3 [ f 0 ( f 0 ( 3 ] (6 / h n [ f 0 f 0 ( ] C n 1 f ( (A11' where B ( + 1, C 1, f n 1 Equation (A11 (A11' is the governing equation of { f, f n 1} with a fixed boundary condition of f at x and x Step : Evaluate { f, f 1 n}, {a, b, f 1 n 1}, and Area f (xdx from the results obtained in step 1 Using the matching conditions f the cubic spline, we can show that f 1 n 1, we have a (h / 6[ f +1 f ] b (h / 6[ f +1 + f ] f f 0 ( / 6[ f + f +1 ] (A1 (A13 (A14 f n, we have f ( f 0 + (h n 1 / 6[ f + f ( ] (A15 A-6

Numerical Simulation of Space Plasmas (I [AP-4036] Appendix A by Ling-Hsiao Lyu April 017 Substituting equations (A1 and (A13 into equation (A9, one can obtain the area under the cubic-spline curve between x The Area f (xdx can be obtained by summation of equation (A9 over all intervals Case 4: Step 1: Determine { f, f 1 n 1} from a tabulate data set { (x, f 1 n } with periodic boundary conditions: f ( f (, f ( f (, and f ( f ( Since f ( f (, we have f 0 (x 0 f 0 Given periodic boundary conditions: f ( f (, and f ( f (, equation (A3 can be rewritten as f + f B + f +1 C (6 / h n 1 [ f 0 f 0 ] f 1 + f B + f +1 C (6 / 1 [ f 0 f 0 1 ] f 1 + f B + f ( C (6 / 1 [ f 0 f 0 1 ] f 1 f n f n 1 (A16 B 1 C 1 0 0 1 1 B C! 0 0!!! 0 0! 1 B n C n C n 1 0 0 1 B n 1 f ( f ( f ( f (6 / h n 1 [ f 0 ( f 0 ] (6 / h 1 [ f 0 ( f 0 ( ] (6 / h n 3 [ f 0 ( f 0 ( 3 ] (6 / h n [ f 0 f 0 ( ] (A16' where B ( + 1, C 1, f 1 n 1 Equation (A16 (A16' is the governing equation of { f, f 1 n 1} with periodic boundary conditions: f ( f ( and f ( f ( Step : Step in Case 4 is the same as Step in Case 3 A-7