PSOD Lecture 2.

Slides:



Advertisements
Similar presentations
M. Dumbser 1 / 23 Analisi Numerica Università degli Studi di Trento Dipartimento dIngegneria Civile ed Ambientale Dr.-Ing. Michael Dumbser Lecture on Numerical.
Advertisements

Chapter 0 Review of Algebra.
MathCAD Data.
LAPLACE TRANSFORMS.
Determinant The numerical value of a square array of numbers that can be used to solve systems of equations with matrices. Second-Order Determinant (of.
STATE SPACE MODELS MATLAB Tutorial.
Complex Numbers.
Solving Equations Numerically Figure 4.1a Rename the independent variable x if necessary. For Figure 4.1a, Set up the table. Set up the first column for.
1 Eng. Mohamed El-Taher Eng. Ahmed Ibrahim. 2 1.FUNCTION SUMMARY polyfun  Polynomial functions are located in the MATLAB polyfun directory. For a complete.
Solving Equations Numerically Figure 2.1a Rename the independent variable x if necessary. For Figure 2.1a, Set up the table. Set up the column for the.
Autar Kaw Humberto Isaza
Systems of Linear Equations
Linear Systems of Equations Ax = b Marco Lattuada Swiss Federal Institute of Technology - ETH Institut für Chemie und Bioingenieurwissenschaften ETH Hönggerberg/
Solving Linear Equations Rule 7 ‑ 1: We can perform any mathematical operation on one side of an equation, provided we perform the same operation on the.
MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.
MathCAD Data. Data in tables Tables are analogous to matrix The numbers of columns and rows can be dynamically changed (in contrast to matrix) To enter.
Matlab Matlab is a powerful mathematical tool and this tutorial is intended to be an introduction to some of the functions that you might find useful.
Process simulation, optimisation and design. P.S.O.D. ORGANIZATION ISSUES.
Lesson 4 Review of Vectors and Matrices. Vectors A vector is normally expressed as or in terms of unit vectors likewise.
Differential Equations and Boundary Value Problems
Vectors and Matrices Class 17.1 E: Ch. 5.
Matrix Mathematics in MATLAB and Excel
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 6. Eigenvalue problems.
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
Solving System of Linear Equations. 1. Diagonal Form of a System of Equations 2. Elementary Row Operations 3. Elementary Row Operation 1 4. Elementary.
Chapter 2 Systems of Linear Equations and Matrices Section 2.4 Multiplication of Matrices.
Algebra Review. Polynomial Manipulation Combine like terms, multiply, FOIL, factor, etc.
Mathcad Variable Names A string of characters (including numbers and some “special” characters (e.g. #, %, _, and a few more) Cannot start with a number.
Data processing in MathCAD. Data in tables Tables are analogous to matrices Tables are analogous to matrices The numbers of columns and rows can be dynamically.
Systems and Matrices (Chapter5)
Introduction to MATLAB for Engineers Third Edition William J. Palm III Chapter 11 MuPAD PowerPoint to accompany Copyright © The McGraw-Hill Companies,
ECON 1150 Matrix Operations Special Matrices
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Fin500J Topic 6Fall 2010 Olin Business School 1 Fin500J: Mathematical Foundations in Finance Topic 6: Ordinary Differential Equations Philip H. Dybvig.
4.4 & 4.5 Notes Remember: Identity Matrices: If the product of two matrices equal the identity matrix then they are inverses.
Application of Differential Applied Optimization Problems.
Section 3.6 – Solving Systems Using Matrices
MATH – High School Common Core Vs Tested Kansas Standards Please note: For informational purposes, all Common Core standards are listed, and the tested.
1 Ch. 4 Linear Models & Matrix Algebra Matrix algebra can be used: a. To express the system of equations in a compact manner. b. To find out whether solution.
MATLAB Basics. The following screen will appear when you start up Matlab. All of the commands that will be discussed should be typed at the >> prompt.
PSOD Lecture 2. Matrices and vectors in Chemical & Process Engineering Appear in calculations when process is described by the system of equations:
An Introduction to MathCAD Finding Solutions and Symbolic Maths.
4.1.2 – Compound Inequalities. Recall from yesterday, to solve a linear- inequality, we solve much like we solve an equation – Isolate the variable –
An Introduction to MathCAD You can always find a solution !!
Scientific Computing General Least Squares. Polynomial Least Squares Polynomial Least Squares: We assume that the class of functions is the class of all.
Chapter 8 Integration Techniques. 8.1 Integration by Parts.
4.1.1 – Solving Inequalities. All equations we have solved are considered problems of equality – Involves some kind of equal sign On the other hand, we.
Newton’s Method, Root Finding with MATLAB and Excel
ME 142 Engineering Computation I Matrix Operations in Excel.
Copyright © 2011 Pearson Education, Inc. Solving Linear Systems Using Matrices Section 6.1 Matrices and Determinants.
Solving Inequalities and their Graphs
Slide Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley A set of equations is called a system of equations. The solution.
3.6 Solving Systems Using Matrices You can use a matrix to represent and solve a system of equations without writing the variables. A matrix is a rectangular.
Warm- Up Solve the following systems using elimination or substitution : 1. x + y = 6 -3x + y = x + 4y = 7 x + 2y = 7.
4.8 Using matrices to solve systems! 2 variable systems – by hand 3 or more variables – using calculator!
Lecture 6 - Single Variable Problems & Systems of Equations CVEN 302 June 14, 2002.
GUIDED PRACTICE for Example – – 2 12 – 4 – 6 A = Use a graphing calculator to find the inverse of the matrix A. Check the result by showing.
Copyright ©2015 Pearson Education, Inc. All rights reserved.
PreCalculus Section 1.6 Solve quadratic equations by: a. Factoring b. Completing the square c. Quadratic formula d. Programmed calculator Any equation.
3.8B Solving Systems using Matrix Equations and Inverses.
GRAPHING LINEAR AND NONLINEAR SYSTEMS A-CED.2 CREATE EQUATIONS IN TWO OR MORE VARIABLES TO REPRESENT RELATIONSHIPS BETWEEN QUANTITIES; GRAPH EQUATIONS.
Matrices and systems of Equations. Definition of a Matrix * Rectangular array of real numbers m rows by n columns * Named using capital letters * First.
SOLVING ONE-STEP EQUATIONS Integrated Math I Objective: Solve one-step linear equations in one variable with strategies involving inverse operations and.
10.4 Matrix Algebra. 1. Matrix Notation A matrix is an array of numbers. Definition Definition: The Dimension of a matrix is m x n “m by n” where m =
Introduction to Differential Equations
CHAPTER 3 NUMERICAL METHODS
FE Exam Tutorial
Matrix Equations Step 1: Write the system as a matrix equation. A three-equation system is shown below. First matrix are the coefficients of all the.
Introduction Mathcad is a product of mathSoft inc. The Mathcad can help us to calculate, graph, and communicate technical ideas. It lets us work with.
Integrated Math 3 – Mod 3 Test Review
Presentation transcript:

PSOD Lecture 2

MathCAD – vectors and matrix

MathCAD – vectors and matrix Matrix operations Multiply by constant Matrix transpose [ctrl]+[1] Inverse [^][-][1] Matrix multiplying Determinant

MathCAD – vectors and matrix To read the matrix elements Ar, k: key [[] r- row nr, k – column nr e.g. element A1,1 keys: [A][[][1][,][1][=] To chose matrix column First column A( A<0>): keys [A][ctrl]+[6][0] Default first column number is 0, (to change : Math/Options/Array Origin)

MathCAD – vectors and matrix Calculations of dot product and cross product of vectors

MathCAD – vectors and matrix Special definition of matrix elements as a function of row-column number Mi,j=f(i,j) E.g. Value of element is equal to product of column and row number Argumenty funkcji są liczbami całkowitymi nieujemnymi od zera do ilości wierszy i/lub kolumn Constrain: function arguments have to be integer

3D graphs of function on the base of matrix : [ctrl]+[2] [M] MathCAD 3D graphs 3D graphs of function on the base of matrix : [ctrl]+[2] [M] M – matrix defined earlier

3D Graphs of function of real type arguments MathCAD 3D graphs 3D Graphs of function of real type arguments Using procedure: CreateMesh(function, lb_v1, ub_v1, lb_v2, ub_v2, v1grid, v2grid) Assign result to variable Plot of the variable similarly to plot of matrix ([ctrl]+[2]) Boundaries can be the real type numbers. (def. –5,5) Grids have to be integer type numbers (def. 20)

MathCAD 3D graphs

MathCAD 3D graphs - formating

MathCAD 3D graphs – formatting: fill options

MathCAD 3D graphs – formatting: fill options Contours colour filled

MathCAD 3D graphs – formatting: line options

MathCAD 3D graphs – formatting: Lighting Oświetlać - lighten

MathCAD 3D graphs – formatting: Fog and perspective

MathCAD 3D graphs – formatting: Backplane and Grids

Predefined constants e = 2,718 – natural logarithm base g = 9,81 m/s2 – acceleration of gravity  = 3,142 – circle perimeter/diameter ratio

MathCAD equation solving Single equation (one unknown value) Given-Find method Input start point of variable Type "Given" Type equation with using [=] ([ctrl]+[=]) Type Find(variable)= Variable that satisfy an equation

MathCAD equation solving Given-Find – solving methods Linear (function of type c0x0 + c1x1 +...+ cnxn) –starting point do not affects on results, it only defines size of matrix/vector of the solution. Nonlinear – according to nonlinear equation. Obtained result could depend on starting point. Available methods: Conjugate Gradient Quasi – Newton Levenberg-Marquardt Quadratic The choice of method is automatic by default. User can choose method from the pop-up menu over word Find.

MathCAD equation solving Single equation (one unknown value) Root procedure: Root(function, variable, low_limit, up_limit)= Values of function at the bounds must have different signs or

MathCAD equation solving Single equation (one unknown value) Root procedure methods: Secant method Mueller method (2nd order polynomial) y1 x2 x3 x5 x4 x1 y3 y2

MathCAD equation solving Single equation (one unknown value) Special procedure: polyroots for the polynomials. Argument of procedure is a vector of polynomial coefficients (a0, a1...). The result is a vector too. Methods: Laguerre's method companion matrix

MathCAD, the system of equations solving The system of linear equations Solving on the base of matrix toolbar: Prepare square matrix of equations coefficients (A) and vector of free terms (B) Do the operation x:=A-1B and show result: x= Or Use the procedure LSOLVE: lsolve(A,B)=

MathCAD, the system of equations solving

MathCAD, the system of equations solving The system of nonlinear equation Can be solved using given-find method Assign starting values to variables Type Given Type the equations using = sign (bold) Type Find(var1, var2,...)=

MathCAD, the system of equations solving

Ordinary differential equations solving Numerical methods: Gives only values not function Engineer usually needs values There is no need to make complicated transformations (e.g. variables separation) Basic method implemented in MathCAD is Runge-Kutta 4th order method.

Ordinary differential equations solving Numerical methods principle Calculation involve bounded range of independent variable only Every point is being calculated on the base of one or few points calculated before or given starting points. Independent variable is calculated using step: xi+1 = x i + h = xi+Dx Dependent value is calculated according to the method yi+1 = y i +Dy= y i +Ki

Ordinary differential equations solving Runge-Kutta 4th order method principles: New point of the integral is calculated on the base of one point (given/calculated earlier) and 4 intermediate values

MathCAD differential equations Single, first order differential equation Assign the initial value of dependent variable (optionally) Define the derivative function Assign to the new variable the integrating function rkfixed: R:=rkfixed(init_v, low_bound, up_bound, num_seg, function) Initial condition

MathCAD differential equations Result is matrix (table) of two columns: first contain independent values second dependent ones To show result as a plot: R<1>@R<0>

MathCAD differential equations

MathCAD differential equations System of first order differential equations Assign the vector of initial conditions of dependent variables (starting vector) Define the vector function of derivatives (right-hand sides of equations) Assign to the variable function rkfixed: R:=rkfixed(init_vect, low_bound, up_bound, num_seg, function)

MathCAD differential equations Result is matrix (table) of three columns: first contain independent values, 2nd first dependent values, third second ones : Results as a plot: R<1>,R<2>@ R<0>

MathCAD differential equations

MathCAD differential equations Single second order equation Transform the second order equation to the system of two first order equations: Initial condition

MathCAD differential equations Example: Solve the second order differential equation (calculate: values of function and its first derivatives) given by equation: While y=10 and y’=-1 for x=0 In the range of x=<0,1>

MathCAD differential equations Starting vector Vectoral function System of equations