PART 1 User's Guide
16. 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.
16.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’.
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.
Example:
check SymbMath whether or not it had already known integral of f(x) IN: integrate(f(x), x)
OUT: integrate(f(x), x) IN: integrate(f(x), x, 1, 2) OUT: integrate(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: integrate(f(x), x) OUT: x*f(x) - e^x
IN: integrate(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.
Another example is IN: f'(x_) := 1/sqrt(1-x^2) IN: integrate(f(x), x) OUT: sqrt(1 - x^2) + x*f(x) IN: integrate(k*f(a*x+b), x)
OUT: k*(sqrt(1 - (b + a*x)^2) + (b + a*x)*f(b + a*x))/a IN: integrate(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:
IN: f'(x_) := eval(integrate(cos(x),x)) OUT: f'(x_) := sin(x)
IN: integrate(f(x), x) OUT: -sin(x)
IN: integrate(f(a*x + b), x) OUT: -sin(b + a*x)/a
IN: integrate(x*f(x), x) OUT: -cos(x) - x*sin(x) IN: integrate(x^1.5*f(x), x)
OUT: 1.5*integrate(sqrt(x)*sin(x), x) - x^1.5*sin(x) IN: integrate(x^2*f(x), x)
OUT: -2*x*cos(x) + 2*sin(x) - x^2*sin(x) IN: integrate(x*f(x^2), x)
OUT: -sin(x^2)
IN: integrate(x^3*f(x^2), x)
OUT: -0.5*cos(x^2) - 0.5*x^2*sin(x^2) IN: integrate(f(x)/(x^1.5), x)
OUT: -2/sqrt(x)*f(x) + 2*integrate(sin(x)/sqrt(x), x) IN: integrate(f(x)/(x^2), x)
OUT: -f(x)/x + si(x)
16.2. Learning Complicated
Integrals from a Simple Integral
You supply a simple indefinite integral, and in return, SymbMath will perform the related complicated integrals.
Example:
Check whether SymbMath has already known the following integrals or not.
IN: integrate(f(x), x) OUT: integrate(f(x), x) IN: integrate((2*f(x)+x), x) OUT: integrate((2*f(x)+x), x)
IN: integrate(integrate(f(x)+y), x), y) OUT: integrate(integrate(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: integrate(f(x_), x_) := f(x) - x IN: integrate(2*f(x)+x, x)
OUT: 2*f(x) - 2*x + 1/2*x^2
IN: integrate(integrate(f(x)+y, x), y) OUT: f(x)*y - x*y + x*y^2
You can also ask SymbMath to perform the following integrals:
integrate(integrate(f(x)+y^2, x), y), integrate(integrate(f(x)*y, x), y), integrate(x*f(x), x),
triple integral of f(x)-y+z, or others.
16.3. Learning Definite Integral from Indefinite Integral
You continue to ask indefinite integral.
IN: integrate(integrate(f(x)+y, x from 0 to 1), y from 0 to 2) OUT: 2 f(1)
16.4. Learning Complicated
Derivatives from 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 :
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), assign f'(x_) with 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.
16.5. Learning Integration from Algebra
If you show SymbMath algebra, SymbMath can learn integrals from that algebra.
Example :
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: integrate(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.
16.6. Learning Complicated Algebra from Simple Algebra
SymbMath has the ability to learn complicated algebra from simple algebra.
Example:
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)
16.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 different 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’
and/or one integral of f(x)), SymbMath will determine how to go about solutions of many problems.
If the learning is saved as a library, then you do not need to teach