Symbolic mathematics: algebra ezplot calculus

Slides:



Advertisements
Similar presentations
Beginning Programming for Engineers
Advertisements

Chapter 11: Symbolic Computing for Calculus
Lecture 4 Structure plan Program design process Program design process Basic elements of code: Basic elements of code: –Input (assignment of variables)
Jeopardy Exponents Operations on Real Numbers Geometry Polynomials Properties of Real Numbers Q $100 Q $200 Q $300 Q $400 Q $500 Q $100 Q $200 Q $300.
CSE 123 Symbolic Processing. Declaring Symbolic Variables and Constants To enable symbolic processing, the variables and constants involved must first.
MATLAB FUNDAMENTALS: USER DEFINED FUNCTIONS THE SYMBOLIC TOOLBOX HP 100 – MATLAB Wednesday, 10/29/2014
7.1Variable Notation.
SOLVING QUADRATICS General Form: Where a, b and c are constants.
Multiplying and Dividing Rational Expressions
Lecture 16 Symbolic Mathematics Symbolic mathematics: algebraezplotcalculus © 2007 Daniel Valentine. All rights reserved. Published by Elsevier.
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.
Solving Algebraic Equations S. Awad, Ph.D. M. Corless, M.S.E.E. D. Cinpinski E.C.E. Department University of Michigan-Dearborn Math Review with Matlab:
1 Chapter 8 Calculus Operations with MATLAB We are now ready to see how calculus operations can be performed with MATLAB. It should be noted that a digital.
7.4 Solving Polynomial Equations Objectives: Solve polynomial equations. Find the real zeros of polynomial functions and state the multiplicity of each.
Algebraic Expressions Objectives: 1)To evaluate algebraic expressions 2)To simplify algebraic expressions.
Sections 1.4 and 1.5 Order of Operations, Part 1
Thinking Mathematically Algebra: Graphs, Functions and Linear Systems 7.3 Systems of Linear Equations In Two Variables.
1 1.0 Students solve equations and inequalities involving absolute value. Algebra 2 Standards.
Math 002 College Algebra Final Exam Review.
Analytical vs. Numerical Minimization Each experimental data point, l, has an error, ε l, associated with it ‣ Difference between the experimentally measured.
Chapter 12 Review: Symbolic Mathematics
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.
MAT 1221 Survey of Calculus Maple
Chapter 2: First Steps in MuPAD MATLAB for Scientist and Engineers Using Symbolic Toolbox.
An Introduction to MathCAD Finding Solutions and Symbolic Maths.
 To simplify expressions containing positive integral exponents.  To solve exponential equations.
Introduction To this point MATLAB has been used to answer questions with a numeric value ▫Variables are assigned specific values ▫Answers are numbers MATLAB.
7.4 Solving Polynomial Equations Objectives: Solve polynomial equations. Find the real zeros of polynomial functions and state the multiplicity of each.
Chapter 8 Integration Techniques. 8.1 Integration by Parts.
Analytical Toolbox Integral CalculusBy Dr J.P.M. Whitty.
Chapter 11 Calculus. Symbolic Expressions Required: > Symbolic Math Toolbox > Use Symbolic Variables.
Holt McDougal Algebra Multiplying and Dividing Rational Expressions Simplify rational expressions. Multiply and divide rational expressions. Objectives.
TUESDAY 2.Solve the following equations. a. b. 3.Graph the line. 10x 5 -36x 14 -6r 7 = 13 + r -13 r = – x = -3x + x -8 = -2x x = 4.
EEE 242 Computer Tools for Electrical Engineering Lecture IV Mustafa KARABULUT.
Mathematical Applications By Matlab 3 rd Day Dr. Wael Khedr CSI Dept.
3.1 – Simplifying Algebraic Expressions
Trigonometric Identities
Symbolic Mathematics Chapter 12
© Dr. Elmer P. Dadios - DLSU Fellow & Professor
Symbolic Toolbox Dr GUNASEKARAN THANGAVEL Lecturer & Program Co-ordinator Electronics & Telecommunication Engineering EEE Section Department of Engineering.
The Laws of Exponents.
Solution of Nonlinear Equations
Introduction to Algebra
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.
Chapter 5 Integral Transforms and Complex Variable Functions
Trigonometric Identities
3-2: Solving Systems of Equations using Substitution
Multiplying and Dividing Rational Expressions
More U-Substitution: The “Double-U” Substitution with ArcTan(u)
Solve a system of linear equation in two variables
3-2: Solving Systems of Equations using Substitution
Solving Systems of Equations using Substitution
Section Indefinite Integrals
3-2: Solving Systems of Equations using Substitution
Algebra Vocabulary.
Copyright © Cengage Learning. All rights reserved.
The Laws of Exponents.
Lecture 4 Structure plan
Algebra Section 11-1 : Rational Expressions and Functions
3-2: Solving Systems of Equations using Substitution
Section Indefinite Integrals
A rational expression is a quotient of two polynomials
3-2: Solving Systems of Equations using Substitution
3-2: Solving Systems of Equations using Substitution
3-2: Solving Systems of Equations using Substitution
3-2: Solving Systems of Equations using Substitution
Laplace Transforms Important analytical method for solving linear ordinary differential equations. - Application to nonlinear ODEs? Must linearize first.
Laplace Transforms Important analytical method for solving linear ordinary differential equations. - Application to nonlinear ODEs? Must linearize first.
Section 9.1 “Properties of Radicals”
Presentation transcript:

Symbolic mathematics: algebra ezplot calculus

“Symbolic” toolbox allows you to: Enter expressions in symbolic form with symbolic data types. Expand or simplify symbolic expressions. Find symbolic roots, limits, minima, maxima, etc. Differentiate and integrate symbolic functions. Generate Taylor series of functions (among other tools). Solve algebraic and differential equations symbolically. Solve simultaneous equations (even some nonlinear). Do variable precision arithmetic. Create graphical representations of symbolic functions.

Creating Symbolic Variables In order to use the symbolic toolbox, you must create symbolic variables. To create one symbolic variable, type: You can also use the syms command:

Creating Multiple Variables To create several symbolic variables use the syms command as follows: This creates the symbolic variables K, T, and P0; execute the command whos to check that this is indeed the case.

Creating a symbolic expression with symbolic variables To create an expression using existing symbolic variables, type: This creates a symbolic expression that includes the exponential function. It could represent the exponential growth of a population.

Creating an expression with sym() You can also create symbolic expressions with the sym() command:

Symbolic equations It is possible to write equations with the symbolic toolbox. Type the following: This equation is the ideal gas law.

Manipulating symbolic expressions numden() expand() factor() collect() simplify() simple() poly2sym()

numden() The numden() command is used to separate the numerator and denominator of a quotient. Use numden() on the following expression: numerator= 2*(x + 3)^2 denominator= (x^2 + 6*x + 9)

expand() expand() is used to expand an expression by expanding the products of factors in an expression. Expand the numerator of y: ans= 2*x^2 + 12*x + 18

factor() The factor() command is used to factor an expression into a product of terms. Example: Factor the expression for the denominator. ans= (x + 3)^2

simplify() The simplify() command uses the Maple simplification algorithm to simplify each part of an expression. Enter the expression: ans= 12*a - a^3 + 3*a^2 - 27

simple() The simple() command executes many techniques to simplify an expression; its ans is the simplest expression. ans = 3*a - (a + 3)*(a - 3)^2 Note: The simple() command displays the results of all simplification methods; only the final result, i.e., the answer (ans) is shown here.

poly2sym() The poly2sym() function uses an array of coefficients to create a polynomial: b= x^2 + 3*x + 2 The function sym2poly() is the inverse of poly2sym().

solve() The solve() function sets an expression equal to zero, then solves the equation for its roots. ans= 3 -3

Hands on ans = 1/2/a*( -b + (b^2 - 4*a*c)^(1/2)) 1/2/a*( -b - (b^2 - 4*a*c)^(1/2)) Note: The expression is in single quotes; if the symbolic variables in the expression have not been defined previously, then the single quotes are necessary.

Hands on Note that this solves the expression for “a”. ans = -(b*x + c)/x^2 Note that this solves the expression for “a”.

Systems of equations You can use solve() to find the solution of a system of equations. x= -2 y= 5 z= -6 Note that the solve function produces symbolic output. You can change the output to numerical values with the double() command.

Substitution with subs() The subs() command allows you to substitute a symbol with another symbol or assign a number to a variable. yquadratic = a*y^2 + b*y + c

Multiple substitutions You can use the subs() command to do multiple substitutions in one command. This is done by grouping the variables and their substitutes (other variables or numerical values) in braces. subs(symbolic_function, {substitutant}, {substitute}) ans = 27

Plotting symbolical functions Plotting symbolic functions in MATLAB is done with the ezplot() set of commands. The syntax of ezplot() when y is a function of x is: ezplot(y)

Differentiation MATLAB allows you to differentiate symbolic functions with the diff() command. The syntax of diff(), when f is a symbolic function of the variable x and n is the order of the derivative to be determined, is: diff(f,'x' ,n) ans = 2*x-2 Try a second derivative. Your result should be 2.

Integration MATLAB allows you to integrate symbolic functions with the int() command. Either definite integrals, with assigned numeric or symbolic bounds, or indefinite integrals (note that when you compute indefinite integrals, the constant of integration does not appear explicitly). int(y,'x',a,b) ans = 1/3*x^3-x^2+3*x Try a definite integral for 1<x<2. The result should be 7/3.

Integration constant If you want to display the integration constant when applying the int() function, you can do the following: syms x y a y = 2*x; int(y,’a’,’x’) ans = x^2–a^2

Exercises Use the symbolic toolbox to solve the following system of equations: x + 2y - z = 4 3x + 8y + 7z = 20 2x + 7y + 9z = 23 The velocity of a car is v = t^2 – 3t + 5. Find the displacement for 1<t<5 and the acceleration at t=1.5. Plot the equations for distance, velocity, and acceleration on one graph.

Summary Creating Symbolic Expressions Manipulation Solutions Plotting sym(‘x’), syms x, expressions i.e. e=sym(‘m*c^2’) Manipulation numden, expand, factor, collect, simplify, simple, poly2sym Solutions solve, subs Plotting ezplot Differentiation diff(y, ‘x’, n) Integration int(y, ‘x’, a, b)