MathCAD. Boundary value problem Second order differential equation have two initial values. They...

23
MathCAD
  • date post

    19-Dec-2015
  • Category

    Documents

  • view

    217
  • download

    1

Transcript of MathCAD. Boundary value problem Second order differential equation have two initial values. They...

Page 1: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

MathCAD

Page 2: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

Boundary value problem Second order differential equation

have two initial values. They can be placed in different points.

yyxfy ,,

a b

A

B

Ay for ax By for bx

Page 3: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

Boundary value problem

Other type of initial conditions

Ay for ax By for bx

a b

tg=B A

Page 4: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

Boundary value problem Concerns second order differential

equations or systems of first order differential equations

Initial conditions are given on opposite boundaries of solving range

Numerical methods (usually) needs initial values focused in one point (one of the boundaries)

Page 5: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

Boundary value problem

Initial conditions to start the integrating procedure

Ay for ax By for ax

a btg=B

Page 6: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

Boundary value problem

We have to guess missing initial condition at the point we start the calculations

Conditions given Condition to guess

yA, yB y’A or y’B

yA, y’B y’A or yB

y’A, yB yA or y’B

Page 7: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

Boundary value problem

HOW TO GUESS??!!

1. Assume missing initial value(s) at start point

2. Make the calculation to the endpoint of independent variable

3. Check the difference between boundary condition calculated and given on the endpoint

4. If the difference (error) is too large change the assumed values and go back to point 2.

Page 8: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

Boundary value problem Example:

Given initial conditions of system of two differential equations

(range <a,b>): y1a, y1b

To start calculations the value of y2a is necessary

1. Assume y2a

2. Calculate values of y1, y2 until the point b is reached

3. Calculate the difference (error) e = |y1b(calculated)-y1b,(given)|

4. If e>emax change y2aand go to p. 2

212

211

,,

,,

yyxfdx

dy

yyxfdx

dy

Page 9: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

Boundary value problem What is necessary to solve the boundary

values problem?

1. System of equations

2. Endpoints of the range of independent variable

3. Known starting point values

4. Starting point values to guess

5. Calculation of error of functions values on the opposite side of interval

Page 10: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

To find missing initial values in the MathCAD the sbval procedure can be used. SYNTAX: sbval(v, a, b, D, S, B) a, b – endpoints of the interval on which the differential

equation is being evaluated (p. 2)

v – vector of guesses of searched initial values in the starting point a (p. 4)

D – vector function of independent variable and dependent variable vector, consists of right hand sides of equations. Dependent variables in the equations HAVE HAVE TO BE vector typeTO BE vector type! (p. 1)

S – vector function of starting point and vector of guesses (v) defining initial conditions on starting point (p. 3&4)

B – function (could be vector type) to calculate error on the endpoint (b) (p. 5)

Boundary value problem

Page 11: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

Boundary value problem

Page 12: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

Boundary value problem

Page 13: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

MathCAD symbolic operations

Chosen symbolic operations accessible in MathCAD

Simple symbolic evaluation: algebraic expressions, derivating, integrating, matrix operations, calculation of limits etc.

Symbolic with keyword: substitute, expand, simplify, convert, parfrac, series, solve,

Page 14: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

MathCAD symbolic operations

Symbolic operation are accessible from the Symbolic Toolbar or through the keys:

[ctrl][.] simple operations [shift][ctrl][.] operations with keywords

To get the symbolic result NO NO VALEUEVALEUE can be assigned to the variables used in expressions!!

Page 15: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

MathCAD symbolic operations

simple operations Symbolic integration

Indefinite integration sign, expresion, [ctrl]+[.]

Symbolic derivation Derivative sign, expression, [ctrl]+[.]

Page 16: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

Substitute - replace all occurrences of a variable with another variable, an expression or a number expression [ctrl][shift][.] substitute, substitution

equation expand - expands all powers and products of

sums in the selected expression expression [ctrl][shift][.] expand

Simplify - carry out basic algebraic simplification and apply trigonometric and inverse function identities expression [ctrl][shift][.] simplify

MathCAD symbolic operations

Page 17: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

Factor – transforms an expression into a product expression [ctrl][shift][.] factor

If product of differences of type independent variable integer data exists

To convert an equation to a partial fraction, type: expression, [ctrl][shift][.] convert,parfrac, variable

series keyword finds Taylor series expression, [ctrl][shift][.] series, variable = central point of

expansion, order of approximation To solve single equation

expression [ctrl][shift][.] solve, variable Assumes expression equal 0

MathCAD symbolic operations

Page 18: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

To solve system of equation Type Given Type equations (using [ctrl]+[=]) find(var1, var2,..) [ctrl][.]

MathCAD symbolic operations

Page 19: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

Units in MathCAD

Page 20: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

System of units available in MathCAD: SI - fundamental units: meters (m), kilograms

(kg), seconds (s), amps (A), Kelvin (K), candella (cd), moles (mole).

MKS - fundamental units: meters (m), kilograms (kg), seconds (sec), coulombs (coul), Kelvin (K)

CGS - fundamental units: centimeters (cm), grams (gm), seconds (sec), coulombs (coul), Kelvin (K)

US - fundamental units: feet (ft), pounds (lb), seconds (sec), coulombs (coul), Kelvin (K)

Page 21: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

To add unit: type unit after number (MathCAD will add multiplication sign between number and units)

MathCAD converts units between Units Systems and between fundamental and derived unit. User can define new derived units as fallows:

derived_unit:=multiplier*fundamental_unit, e.g.: kPa:=1000*Pa

Page 22: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

Independently of units used in data the results are given in fundamental units of actual Units System. It can be changed!!

After the result of evaluation the placeholder appears. In these placeholder type the desired unit

Page 23: MathCAD. Boundary value problem  Second order differential equation have two initial values. They can be placed in different points. ab A B for.

Calculations with units.

Calculate volume of rectangular prism of size

ft