Escolar Documentos
Profissional Documentos
Cultura Documentos
f ( x +h)f ( x)
h
This formula follows directly from the definition of the derivative in calculus. An alternative
would be to use a Backward Difference
f '(x) =
f ( x ) f ( xh)
h
Since the errors for the forward difference and backward difference tend to have opposite
signs, it would seem likely that averaging the two methods would give a better result than
either alone. If the points are evenly spaced then averaging the forward and backward
differences leads to a symmetric expression called the Central Difference
f '(x) =
f ( x +h)f ( xh)
2h
Limitations:
Listed below are the Dos and Donts in using the Numerical Differentiation Solver:
1. Correct syntax must be observed when placing the equation otherwise an error would
occur. Shown in table 1.1 are some functions that can be placed at the equation box with
its respective description.
Table 1.1 equivalent syntax for different math functions
Input function
abs(x)
acos(x)
Math function
Absolute Value
Inverse Cosine
acosh(x)
asin(x)
Inverse Sine
asinh(x)
atan(x)
Inverse Tangent
atanh(x)
cos(x)
Cosine
cosh(x)
Hyperbolic Cosine
cot(x)
Cotangent
csc(x)
Cosecant
Description
Returns the absolute value
of x.
Computes the inverse cosine
of x.
Computes the inverse
hyperbolic cosine of x in
radians.
Computes the inverse sine of
x in radians.
computes the inverse
hyperbolic sine of x in
radians.
Computes the inverse
tangent of x in radians.
Computes the inverse
hyperbolic tangent of x in
radians.
Computes the cosine of x in
radians.
Computes the hyperbolic
cosine of x in radians.
Computes the cotangent of x
in radians (1/tan(x)).
Computes the cosecant of x
exp(x)
Exponential
ln(x)
Natural Logarithm
log(x)
Logarithm Base 10
log2(x)
Logarithm Base 2
pi(x)
sec(x)
Secant
sin(x)
Sine
sinh(x)
Hyperbolic Sine
sqrt(x)
Square Root
tan(x)
tanh(x)
Tangent
Hyperbolic Tangent
in radians (1/sin(x)).
Computes the value of e
raised to the power x.
Computes the natural
logarithm of x (to the base
e).
Computes the logarithm of x
(to the base 10).
Computes the logarithm of x
(to the base 2).
pi(x) = x*
pi(1) =
pi(2.4) = 2.4*
Computes the secant of x
(1/cos(x)).
Computes the sine of x in
radians.
Computes the hyperbolic
sine of x in radians.
Computes the square root of
x.
Tangent
Computes the
hyperbolic tangent of x in
radians.
2. For variable and function names, only lowercase letters are allowed. This solver
interprets capital letters as errors.
3. For the sake of uniqueness, all numbers in exponential notation use the 1E-1 convention
(with the capital letter E). Using 1e-1 (with the lowercase letter e) results in an error
message.
Table1.2 Summary of Frequently committed errors when placing the equation
Error Description
Bracket problem at the beginning
Incomplete function expression
Bracket problem
Bracket problem at the end
Wrong number format
Wrong function call
Not a valid function
Incomplete expression
Wrong letter
Contains more than one variable
Error example
1+x)
sin(x)+
()
(1+x
1e-3 instead of 1E-3
sin()
sins(x)
x+
sin(X)
1+x+y4
4. To have a more accurate solution for a particular equation, the user must use a smaller
stepsize.
Introduction:
An efficient procedure for solving b=Ax is the LU decomposition. While other methods such
as Gaussian elimination method and Choslesky method can do the job well, this LU
decomposition method can help accelerate the computation.
The LU decomposition method first decomposes matrix A into A= LU, where Land U are
lower triangular and lower triangular matrices, respectively. More precisely if Ais a nxn
matrix, L and U are also nxn matrices with the forms like the following:
The lower triangular matrix L has zeros in all entries above its diagonal and the upper
triangular matrix U has zeros in all entries below its diagonal. If the LU-decomposition
of A = L.U is found, the original equation becomes B = (L.U).X. This equation can be
rewritten as B = L.(U.X). Since L and B are known, solving for B = L.Y gives Y = U.X. Then,
since U and Y are known, solving for X from Y = U.X yields the desired result. In this way,
the original problem of solving for X from B = A.X is decomposed into two steps:
1. Solving for Y from B = L.Y
2. Solving for X from Y = U.X
For LU Decomposition, The procedure based on unity elements on the diagonal of matrix L
is called Do littles method (or Gauss factorization), while the procedure based on unity
elements on the diagonal of matrix U is called Crouts method.
How to use:
This solver allows two method to find solution of a system of linear equaions. The first one
is CROUTs METHOD and the second one is the Do Littles method. By pressing its
respective button, the user will be able to use his desired method. The user also has to
choose between 3x3 or 4x4 matrix depending on the given linear equations. Take note that
the activated button is the highlighted button. After choosing the method and the size,
the user can now fill the coefficients of the system of linear equation.
At the bottom of the front panel ,the LU matrix for the system of linear equation is shown.
introduction
In numerical analysis, LU decomposition (where 'LU' stands for 'Lower Upper', and also
called LU factorization) factors matrix as the product of a lower triangular matrix and an
upper triangular matrix. The product sometimes includes permutation matrix as well. The
LU decomposition can be viewed as the matrix form of Gaussian elimination.