home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Press 1997 July
/
Sezamfile97_1.iso
/
msdos
/
misc
/
sm30a.a03
/
SYMBMATH.H47
< prev
next >
Wrap
Text File
|
1993-11-07
|
7KB
|
198 lines
4.15 Learning from User
One of the most important feature of SymbMath is its ability
to deduce and expand its knowledge. If you provide it with the
necessary facts, SymbMath can solve many problems which were unable
to be solved before. The followings are several ways in which SymbMath
is able to learn from your input.
4.15.1 Learning integrals from a derivative
Finding derivatives is much easier than finding integrals.
Therefore, you can find the integrals of a function from the derivative
of that function.
If you provide the derivative of a known or unknown function,
SymbMath can deduce the indefinite and definite integrals of that
function. If the function is not a simple function, you only need to
provide the derivative of its simple function. For example, you want to
evaluate the integral of f(a*x+b), you only need to provide f'(x).
Example 4.15.1.1 :
If you know a derivative of an function f(x) (where f(x) is
a known or unknown function), SymbMath can learn the integrals of that
function from its derivative.
Input:
IN: inte(f(x), x) # check SymbMath whether or not it had already
# known integral of f(x)
OUT: inte(f(x), x)
IN: inte(f(x), x, 1, 2)
OUT: inte(f(x), x, 1, 2)
As the output displayed only what was typed in the input without any
computed results, imply that SymbMath has no knowledge of the indefinite
and definite integrals of the functions in question. Now you teach
SymbMath the derivative of f(x) on the first line, and then run the
program again.
IN: f'(x_) := exp(x)/x
IN: inte(f(x), x)
OUT: x*f(x) - e^x
IN: inte(f(x), x, 1, 2)
OUT: e - f(1) + 2*f(2) - e^2
As demonstrated, you only supplied the derivative of the function, and in
exchange SymbMath logically deduced its integral.
An other example is
IN: f'(x_) := 1/sqrt(1-x^2)
IN: inte(f(x), x)
OUT: sqrt(1 - x^2) + x*f(x)
IN: inte(k*f(a*x+b), x)
OUT: k*(sqrt(1 - (b + a*x)^2) + (b + a*x)*f(b + a*x))/a
IN: inte(x*f(a*x^2+b), x)
OUT: sqrt(1-(a*x^2 + b)^2) + (a*x^2 + b)*f(a*x^2 + b)
The derivative of the function that you supplied can be another
derivative or integral.
Example 4.15.1.2 :
IN: f'(x_) := eval(inte(cos(x),x))
OUT: f'(x_) := sin(x)
IN: inte(f(x), x)
OUT: -sin(x)
IN: inte(f(a*x + b), x)
OUT: -sin(b + a*x)/a
IN: inte(x*f(x), x)
OUT: -cos(x) - x*sin(x)
IN: inte(x^1.5*f(x), x)
OUT: 1.5*inte(sqrt(x)*sin(x), x) - x^1.5*sin(x)
IN: inte(x^2*f(x), x)
OUT: -2*x*cos(x) + 2*sin(x) - x^2*sin(x)
IN: inte(x*f(x^2), x)
OUT: -sin(x^2)
IN: inte(x^3*f(x^2), x)
OUT: -0.5*cos(x^2) - 0.5*x^2*sin(x^2)
IN: inte(f(x)/(x^1.5), x)
OUT: -2/sqrt(x)*f(x) + 2*inte(sin(x)/sqrt(x), x)
IN: inte(f(x)/(x^2), x)
OUT: -f(x)/x + si(x)
4.15.2 Learning complicated indefinite integrals from a simple
indefinite integral
You supply a simple indefinite integral, and in return, SymbMath
will perform the related complicated integrals.
Example 4.15.2.1 :
Check whether SymbMath already knowns the following integrals or not.
IN: inte(f(x), x)
OUT: inte(f(x), x)
IN: inte((2*f(x)+x), x)
OUT: inte((2*f(x)+x), x)
IN: inte(inte(f(x)+y), x), y)
OUT: inte(inte(f(x)+y), x), y)
Supply, like in the previous examples, the information:
integral of f(x) is f(x) - x; then ask the indefinite integral
of 2*f(x)+x, and a double indefinite integral of 2*f(x) + x,
and a double indefinite integral of respect to both x and y. Change
the first line, and then run the program again.
IN: inte(f(x_), x_) := f(x) - x
IN: inte(2*f(x)+x, x)
OUT: 2*f(x) - 2*x + 1/2*x^2
IN: inte(inte(f(x)+y, x), y)
OUT: f(x)*y - x*y + x*y^2
You can also ask SymbMath to perform the following integrals:
inte(inte(f(x)+y^2, x), y),
inte(inte(f(x)*y, x), y),
inte(x*f(x), x),
triple integral of f(x)-y+z, or others.
4.15.3 Learning definite integral from indefinite integral
You continue to ask indefinite integral.
IN: inte(inte(f(x)+y, x from 0 to 1), y from 0 to 2)
OUT: 2 f(1)
4.15.4 Learning complicated derivatives from a simple derivative
SymbMath can learn complicated derivatives from a simple
derivative, even though the function to be differentiated is an unknown
function, instead of standard function.
Example 4.15.4.1 :
Differentiate f(x^2)^6, where f(x) is an unknown function.
IN: d(f(x^2)^6, x)
OUT: 12 x f(x^2)^5 f'(x^2)
Output is only the part derivative. f'(x^2) in the output suggest that
you should teach SymbMath f'(x_). e.g. the derivative of f(x) is another
unknown function df(x), i.e. f'(x_) = df(x), input f'(x_) = df(x) and
run it again.
IN: f'(x_) := df(x)
IN: d(f(x^2)^6, x)
OUT: 12 x f(x^2)^5 df(x^2)
This time you get the complete derivative.
4.15.5 Learning integration from algebra
If you show SymbMath algebra, SymbMath can learn integrals
from that algebra.
Example 4.15.5.1 :
Input f(x)^2=1/2-1/2*cos(2*x), then ask for the integral of f(x)^2.
IN: f(x)^2 := 1/2-1/2*cos(2*x)
IN: inte(f(x)^2, x)
OUT: 1/2 x - 1/4 sin(2 x)
SymbMath is very flexible. It learned to solve these problems, even
though the types of problems are different, e.g. learning integrals
from derivatives or algebra.
4.15.6 Learning complicated algebra from simple algebra
SymbMath has the ability to learn complicated algebra from simple
algebra.
Example 4.15.6.1:
Transform sin(x)/cos(x) into tan(x) in an expression.
IN: sin(x)/cos(x) := tan(x)
IN: x+sin(x)/cos(x)+a
OUT: a + x + tan(x)
4.15.7 Learning vs. Programming
The difference between learning and programming is as follows :
the learning process of SymbMath is very similar to the way human
beings learn, and that is accomplished by knowing certain rule that
can be applied to several problems. Programming is diffrent in the way
that the programmer have to accomplish many tasks before he can begin
to solve a problem. First, the programmer defines many subroutines for
the individual integrands (e.g. f(x), f(x)+y^2, 2*f(x)+x,
x*f(x), etc.), and for individual integrals (e.g. the indefinite
integral, definite integral, the indefinite double integrals,
indefinite triple integrals, definite double integrals, definite
triple integrals, etc.), second, write many lines of program for the
individual subroutines, (i.e. to tell the computer how to calculate
these integrals), third, load these subroutines, finally, call these
subroutines. That is precisely what SymbMath do not ask you to do.
In one word, programming means that programmers must
provide step-by-step procedures telling the computer how to solve
each problems. By contrast, learning means that you need only supply
the necessary facts (usually one f'(x) and/or one intergral of f(x)),
SymbMath will determine how to go about solutions of many problems.
If the learning is saved as a library, then you need not to
teach SymbMath again when you run SymbMath next time.