Return to the home page.

The Ultimate Windows Math Toolbox

 


bullet Ver 3.1.805
8 September 2008
bullet Free support
bullet Only $44.85 (US)
(Professional)
Click to buy UltimaCalc Professional
bullet Only $34.85 (US)
(Standard)
Click to buy UltimaCalc Standard.

bullet Free download

<<< Prev  Next >>>
Algebra - Introduction   

 

Calculus

Differentiation

The function diff differentiates an expression with respect to a symbol. Adding an integer as a third value will specify how many times to perform the differentiation.

Examples:
diff(x^4, x) returns 4*x^3.
diff(x^2 * y^2, y) returns 2*x^2*y, differentiating with respect to y.
diff(atan(a*x + b), x) returns a/(1 + (b + a*x)^2).
diff(x^4, x, 2) calculates the second derivative of x4 to give the result 12*x^2.

Differentiation fails when there are unknown functions. In such a case, diff does as much as it can, and indicates where it had to give up.

Example:
diff(foo(a*x)^3, x) results in 3*Deriv(foo(a*x), x)*foo(a*x)^2.


Integration

The function integrate (or integral) attempts to integrate an expression with respect to a symbol.

Examples:
integrate(x^2, x) returns 1/3*x^3
integrate(sin(a*x + b), x) returns -cos(b + a*x)/a
integral(1/x/(x^2 - 9)^(1/2), x) returns 1/3*acos(3/x)

However, not all expressions can be integrated. Algebra UltimaCalc will try out a variety of approaches to finding an integral. If all attempts fail, it will indicate failure as in the following example:

integrate(sin(sin(x)), x) returns Integral(sin(sin(x)), x). Notice the capital letter in Integral. This prevents it from being treated as the function integral.


How was the integral found?

If integrate succeeds, you can use the function how to obtain a brief explanation of how the integral was obtained. This will not necessarily be the 'best' method for solving the integral.

Example:
integrate(x*sin(x^2), x); how() will return the result -1/2*cos(x^2) followed by some text that indicates that the substitution method was used.


Omission of abs()

The integral of 1/x is log(abs(x)), but Algebra UltimaCalc always omits the abs() function. This can mean that it is sometimes not possible (without using complex numbers) to evaluate an expression returned by integrate due to the argument to a log function in the expression being negative.

Including a call to abs has its own problems. The function's derivative is discontinuous at 0, and differentiating or integrating an expression containing abs can lead to a profusion of instances of abs. The most practical solution seems to be to simply omit the function and take it as understood.

Example:
diff((sin(x)), x, 2) gives the second derivative of sin(x) as -sin(x), but
diff(abs(sin(x)), x, 2) gives the second derivative of abs(sin(x)) as the much more complicated expression:
(-1 + 2*cos(x)^2)/abs(sin(x)) - cos(x)^2*sin(x)^2/abs(sin(x))^3.


Taylor Series

The function taylor calculates a Taylor series expansion. The function takes five arguments: (1) the expression for which a series is to be found, (2) the main symbol in the expression, (3) the value of this symbol around which the expansion is to be found, (4) a symbol which designates the main symbol in the result, and (5) an integer which specifies the number of terms of the series (its degree).

Examples:
taylor(log(x), x, a, h, 3) finds the 3rd order Taylor series of log(x) in the vicinity of x = a in terms of the symbol h.
taylor(log(x), x, 1, x, 5) finds the 5th order Taylor series of log(x) in the vicinity of x = 1, in other words the usual Taylor series for log(1 + x).


Time-out

When calculating a Taylor expansion, some expressions become increasingly difficult to handle as the order increases, and the running time goes up accordingly. It is therefore recommended that you use the simplest form of the expression that will give the desired result. Algebra UltimaCalc will by default time out after a few seconds, stopping the calculation and probably returning a truncated result along with a warning. You can alter the maximum run time by clicking on the Options button and selecting a different value, or even disable the time-out.

An example of this is taylor(atan(1+x), x, 0, x, n) for various values of n from 15 to 20 or so. The running time seems to increase exponentially with increasing n. Evaluating taylor(atan(1+x), x, a, x, 4) will indicate the reason for this.

The calculation can be performed very much faster by changing it to taylor(atan(x), x, 1, x, n) for which a value of 200 for n is still reasonable. (If you try this, note that terms whose order is a multiple of 4 are zero in this series. On a slow computer, you might wish to increase the time-out to perhaps 10 seconds.)


showseries

The command showseries rearranges an expression to make its structure clearer as a series. It collects the coefficients of the the main symbol and its powers, placing the main symbol at the start of a term, and putting the terms in order of ascending powers of the main symbol. It is sometimes useful to wrap this command around the function taylor. Compare this with showpoly.

Examples:
showseries(a + c + a*x + b*x + x^2 + a*x^2, x) shows its result as a + c + x*(a + b) + x^2*(1 + a).
showseries(taylor(atan(x), x, a, x, 3), x) shows clearly the rapidly increasing complexity of this Taylor expansion:
atan(a) + x/(1 + a^2) + x^2 * (-a/(1 + a^2)^2) + x^3 * (4/3*a^2/(1 + a^2)^3 - 1/3/(1 + a^2)^2).