Numerical Analysis Notes

Similar documents
Technology Assignment: Limits at Infinity

Developed in Consultation with Tennessee Educators

ACTIVITY #6 SLOPE IN TWO AND THREE DIMENSIONS AND VERTICAL CHANGE ON A PLANE

12.4 The Ellipse. Standard Form of an Ellipse Centered at (0, 0) (0, b) (0, -b) center

SECTION 3-4 Rational Functions

2.3 Polynomial Functions of Higher Degree with Modeling

3.5 Rational Functions

Implicit differentiation

IB SL REVIEW and PRACTICE

Pre-Algebra Notes Unit 8: Graphs and Functions

Section 9.3: Functions and their Graphs

Perspective Projection Transformation

Integrating ICT into mathematics at KS4&5

Investigation Free Fall

Using a Table of Values to Sketch the Graph of a Polynomial Function

0 COORDINATE GEOMETRY

Functions. Name. Use an XY Coordinate Pegboard to graph each line. Make a table of ordered pairs for each line. y = x + 5 x y.

Chapter Goals: Evaluate limits. Evaluate one-sided limits. Understand the concepts of continuity and differentiability and their relationship.

Section 4.2 Graphing Lines

Glossary alternate interior angles absolute value function Example alternate exterior angles Example angle of rotation Example

Week 10. Topic 1 Polynomial Functions

Double Integrals in Polar Coordinates

Chapter 1. Limits and Continuity. 1.1 Limits

Algebra I. Linear Equations. Slide 1 / 267 Slide 2 / 267. Slide 3 / 267. Slide 3 (Answer) / 267. Slide 4 / 267. Slide 5 / 267

A SCATTERED DATA INTERPOLANT FOR THE SOLUTION OF THREE-DIMENSIONAL PDES

Roberto s Notes on Differential Calculus Chapter 8: Graphical analysis Section 5. Graph sketching

Derivatives 3: The Derivative as a Function

2.4 Polynomial and Rational Functions

5.2 Graphing Polynomial Functions

Find the Relationship: An Exercise in Graphical Analysis

Unit 4 Trigonometry. Study Notes 1 Right Triangle Trigonometry (Section 8.1)

UNIT 4 MODELING AND ANALYZING EXPONENTIAL FUNCTIONS Lesson 1: Creating Exponential Equations

GRAPHS AND GRAPHICAL SOLUTION OF EQUATIONS

Rational functions and graphs. Section 2: Graphs of rational functions

Polar Functions Polar coordinates

SLOPE A MEASURE OF STEEPNESS through 2.1.4

4.4 Absolute Value Equations. What is the absolute value of a number? Example 1 Simplify a) 6 b) 4 c) 7 3. Example 2 Solve x = 2

Module 3 Graphing and Optimization

Using Characteristics of a Quadratic Function to Describe Its Graph. The graphs of quadratic functions can be described using key characteristics:

16.27 GNUPLOT: Display of functions and surfaces

Math 1050 Lab Activity: Graphing Transformations

Contents. How You May Use This Resource Guide

20 Calculus and Structures

The Fundamental Theorem of Calculus Using the Rule of Three

Def.: a, b, and c are called the for the line L. x = y = z =

Domain of Rational Functions

The Graph of an Equation

Rational Functions with Removable Discontinuities

SLOPE A MEASURE OF STEEPNESS through 7.1.5

g(x) h(x) f (x) = Examples sin x +1 tan x!

C URVES AND V ECTORS

Chapter 5: Polynomial Functions

Graphing Rational Functions

You will need to use a calculator for this worksheet A (1, 1)

Using the same procedure that was used in Project 5, enter matrix A and its label into an Excel spreadsheet:

Lesson 2.1 Exercises, pages 90 96

LESSON 3.1 INTRODUCTION TO GRAPHING

3.9 Differentials. Tangent Line Approximations. Exploration. Using a Tangent Line Approximation

science. In this course we investigate problems both algebraically and graphically.

Function vs Relation Notation: A relationis a rule which takes an inputand may/or may not produce multiple outputs. Relation: y = 2x + 1

Partial Fraction Decomposition

Laurie s Notes. Overview of Section 6.3

5.2. Exploring Quotients of Polynomial Functions. EXPLORE the Math. Each row shows the graphs of two polynomial functions.

Section 3.1: Introduction to Linear Equations in 2 Variables Section 3.2: Graphing by Plotting Points and Finding Intercepts

Roberto s Notes on Integral Calculus Chapter 3: Basics of differential equations Section 6. Euler s method. for approximate solutions of IVP s

Chapter 9: Rational Equations and Functions

Database Design 1DL400. Assignment 2:2

5.2 Graphing Polynomial Functions

ABSOLUTE EXTREMA AND THE MEAN VALUE THEOREM

About Finish Line New Jersey Math 5

9.1 Exercises. Section 9.1 The Square Root Function 879. In Exercises 1-10, complete each of the following tasks.

(0, 2) y = x 1 2. y = x (2, 2) y = 2x + 2

GPR Objects Hyperbola Region Feature Extraction

Graphing Equations Case 1: The graph of x = a, where a is a constant, is a vertical line. Examples a) Graph: x = x

3 Limits Involving Infinity: Asymptotes LIMITS INVOLVING INFINITY. 226 Chapter 3 Additional Applications of the Derivative

Chapter 3. Interpolation. 3.1 Introduction

Graphs, Linear Equations, and Functions

PATTERNS AND ALGEBRA. He opened mathematics to many discoveries and exciting applications.

Graphing Radical Functions

Enhanced Instructional Transition Guide

Slope Fields & Differential Equations

9. p(x) = x 3 8x 2 5x p(x) = x 3 + 3x 2 33x p(x) = x x p(x) = x 3 + 5x x p(x) = x 4 50x

4.2 Properties of Rational Functions. 188 CHAPTER 4 Polynomial and Rational Functions. Are You Prepared? Answers

MATH SPEAK - TO BE UNDERSTOOD AND MEMORIZED

REMARKS. 8.2 Graphs of Quadratic Functions. A Graph of y = ax 2 + bx + c, where a > 0

3x 4y 2. 3y 4. Math 65 Weekly Activity 1 (50 points) Name: Simplify the following expressions. Make sure to use the = symbol appropriately.

EXAMPLE A {(1, 2), (2, 4), (3, 6), (4, 8)}

Online Homework Hints and Help Extra Practice

Graphing Polynomial Functions

Polynomial and Rational Functions

4.1 The Coordinate Plane

Vocabulary. Term Page Definition Clarifying Example. dependent variable. domain. function. independent variable. parent function.

Parametric Equations: Motion in a Plane Notes for Section 6.3. are parametric equations for the curve.

A Rational Shift in Behavior. Translating Rational Functions. LEARnIng goals

Module 2, Section 2 Graphs of Trigonometric Functions

Math 111 Lecture Notes Section 3.3: Graphing Rational Functions

PARAMETRIC EQUATIONS AND POLAR COORDINATES

2-1. The Language of Functions. Vocabulary

2.2 Differential Forms

Section 2.2: Absolute Value Functions, from College Algebra: Corrected Edition by Carl Stitz, Ph.D. and Jeff Zeager, Ph.D. is available under a

Transcription:

Numerical Analsis Notes Foes Team Plotting of = f() contour-lines with Ecel Macro isol.ls The Ecel (XP/) macro isol.ls developed b SimonLuca Santoro and kindl released in the free public domain allows to plot iso-levels or contour lines of a bi-variate eplicit function f(). The output of good and accurate qualit are not simpl static bitmap but there are true Ecel graphs that can be manipulated with the standard Ecel tools. The following picture is an eample of the macro output 8 8 6 8 Output Output 6 6 8 - - -8-6 - - 6 - - 6 8-6 8 - The version of this macro can output colored maps thanks to the Mapper macro developed b Robert de Levie for his MacroBundle collection. http://www.bowdoin.edu/~rdelevie/ecellaneous/ A detailed eplanation of this macro can be found in the book "Advanced Ecel for scientific data analsis" of the same author. Generating colored maps together with contours lines allows us to get ver interesting and beautiful graphs.

8 Output Output 6 8 8 6 6 8 - -8-6 - - 6 - - 6 8-6 8 As we can see the colors enhance the global D effect while at the same time the isolines assure the needed precision for scientific computing Other eamples are the following Output Output 6 6 8 8 6 8 6 - - - 8-6 6 8-8

.9.8.7.6.5... Output Output..5..5....6.5..7.5.8..9.5.6.7.9.8.5.5.5 The macro isol.ls outputs the graphs in separated files ls that are generall quite big ( -.5 MB). Successivel the can be re-opened an manipulated without the macro isol.ls. Note. The ip file also contains the template isol_output_t.ls. Do not write this file. It must be onl copied in the same director of the isol.ls macro The macro creates graphs in three different was: b rational function of -th degree P()/Q() b data table [i i i] b Ecel formula Algorithm The algorithm for iso-level plotting bases itself on the triangolariation of the rectangular domain D { : min ma min ma } Sntheticall the basic steps are:. Partitioning in rectangular sub-domains. Partitioning of each sub-domain in triangles. Evaluation of =f() at the vertices (P ' P ' P ') of each triangle.. Identification of the interpolation plane for the vertices of each triangle 5. Identification of the segment AB intersection of the triangle and the plane π = i ) Partitioning in rectangular sub-domains

) Partitioning of each sub-domain in triangles ) Evaluation of = f() at the vertices of each triangle: T T5 T T5. Identification of the interpolation plane for the vertices of each triangle For simplicit we refer to the triangle T Taking: = f( ) = f( ) = f( ) We define the interpolating plane p() = a+b +c The coefficients a b c are determined b the following formulas a = [( - ) + ( - ) + ( - ) ] / d b = [( - ) + ( - ) + ( - ) ] / d c = [( - ) + ( - ) + ( - ) ] / d where: d = + + - - - The more the domain is small the more the plane approimates the surface. 5) Identification of the segment AB At this step we find the segment AB intersection between the interpolation plane p() and the horiontal plane = i where i is the quote of the iso-level that we want to trace. The projection of the segment AB on the plane gives us the new segment A'B' For each side of the triangle determined b the points P ( ) P ( ) the correspondent projection point P'() is given b the formulas:

= [(a - i)( - ) + c ( - )] / m = [(a - i)( - ) + b ( - )] / m where: m = b ( - ) + c ( - ) This operation must be repeated for each side of the triangle simpl b indices permutation. Second side: -> ; -> ; -> ; -> Third side: -> ; -> ; -> ; -> At the end for each triangle we have points A' B' on the plane = belong to the projection of the segment AB. The trace A' B' image of AB on the plane approimates a little piece of the iso-level for = i. The approimation increases when the area of the sub-domains becomes small. P π: = i A B P P A' P' B' P' P' The advantage of this free-gradient method is its robustness because it can also work with irregular non differentiable surfaces. The drawback is an high computational effort (about operations for triangle) that produces a quite long elaboration time (minutes) Parametric Formulas. In order to reduce the computation time we can adopt a variant that avoids the eplicit calculus of the interpolation plane b using the parametric formulas of the triangle segments P ( ) P ( ) P ( ) The coordinates of the image points A' B' C' if eist are given b the following simpler formulas: A' = + t ( + t ( ) ) t = i B' = + t ( + t ( ) ) t = i C' = + t ( + t ( ) ) t = i We pa attention to choose onl the points where is t i

Generall this variant reduces of about / the total elaboration time- How to use the macro isol.ls First of all etract the files isol.ls and isol_output_t.ls from the pack isol.ip and put them in the same director that ou like. Now start Ecel and open the file isol.ls (it contains macros so remember to activate the macro) In the sheet input the controls are grouped in several areas Sets the output file where the plot will be created Parameters area: defines the range of and. Sets the grid of - and for the aes the number of iso-levels. Choose here the output that ou need: iso-leves coloured map or both Selects the source of the function f( ) to plot: Rational function Look-Up table Ecel function The first thing to do is the choice of the output file. Click on new button to open the dialog insert the name that ou want (eample mplot.ls) and give OK. From now on all the output will be redirect to this file until ou will change it. Now we have to choose the function source. This depends b the tpe of problem that we have. Assume for eample that we have to plot the contours of a rational function such as: ( f ) = + for < < and < < 8 and we want to plot iso-lines spaced b. from to For the beginning we chose a grid of nodes. The grid parameters influence the global accurac of the plot and of course the total elaboration time. If the plot will not look sufficientl accurate we should increase the grid. Remember onl that the time increases sharpl with the grid. (For eample if the time required for a grid is sec then the time for a 88 grid will be sec) Note. In the plotting domain the function f() must be alwas defined. If a singularit or a computation error raises the macro stops itself.

Because our function is epressed as a ratio of two polnomials we can select the rational source and input the coefficients: a = b = b 7 = Select the output iso-line Tip. Generall iso-lines are faster then colored map so at the first time is alwas convenient select the option. Successivel after the plot is adjusted we can switch to the other options: or The range and grid parameters will look like the following. Remember onl to take isol-levels in order to have a step of. because it is calculated as: Δ = ( ma min ) / ( n -) Now press Run to generate the plot 8...9.8.7.6.5.. Output Output 7.9.8.9 6.7 5.8.6.5..7.6..5.........6.8...6.8 option Iso-levels option Iso-level+mapper We can also define the function f( ) b the standard Ecel worksheet function Eample. Assume that we want to trace the Van der Waals curves using the following normalied equation ( p + / v )(v ) = 8 t where p = P/Pc v=v/vc t=t/tc are the normalie variables As known these curves are usuall plotted in the plane p-v (Clperon plane). Therefore we assume p and v obtaining t ( ) = (/ + )( ) / 8 Also In this case we could transform this epression in rational form but it is better to insert it directl as an Ecel function =(/M^+N)*(*M-)/8 in O cell

Now insert the range an grid parameters as the following. Note that we cannot set min = because the function is not defined along the aes. Now select the option iso-level + mapper and press Run. We have previous said that the plot generated are true graph that can be manipulated if we need as an other Ecel graph. For eample in the previous graph we note that the labels of the iso-levels between and.6 look quite confused because the are too close each other. It would be better eliminate them from the graph. Instead of re-creating the graph we go to the worksheet output and select the range D:P of the first row containing the values from to.6. Deleting these values we will remove the correspondent labels from the plot. It is also possible re-arrange the labels that are not well disposed b the macro It can be done simpl selecting the label and moving it with the mouse. Saving parameter setting The current formula and parameters setting can be saved b the Parameter button. Insert an identification string as we like eample van der waals and click Save. This parameter setting can be successivel recalled simpl b the Load button There are different separated lists for Rational. Look-up and Ecel function.

Data table Sometime the function is onl known b a tabulated dataset [i i i]. In that case comes useful the nd option "Look-Up". The dataset has onl this constraint: each abscissa i must have points at least. Insert the dataset [i i i] in the columns "i" "j" "k" rispectivel starting from the row Then select the option and start the macro as usual. Note that "look-up" is much slower then the other methods