[53] in mathematical software users group

home help back first fref pref prev next nref lref last post

RSymbMath: a system learning from the user

daemon@ATHENA.MIT.EDU (Weiguang Huang)
Sat Aug 29 21:30:21 1992

Date: Sun, 30 Aug 1992 11:27:07 +1000
From: Weiguang Huang <huang@deakin.OZ.AU>
To: mathematica@otter.Stanford.EDU, xinwei@otter.Stanford.EDU,
Cc: allusers@cauchy.stanford.edu, everybody@netserver.Stanford.EDU,

		    15.17 Learning from Users

	The most important feature of SymbMath is that SymbMath can
learn from users to deduce and expand its knowledge. If users provide
the necessary facts, then SymbMath can solve many problems it could 
not do before.


	15.17.1 Learning indefinite and definite integrals from
		derivatives

	If users provide derivatives, SymbMath can deduce indefinite 
and definite integrals from derivatives. 

	Example 15.17.1. 
First check SymbMath wether or not it had already known indefinite and 
definite integrals of exp(x)/x^2 or exp(x)/x^3.
	Input:
inte(exp(x)/x^2*d(x))
inte(exp(x)/x^3*d(x))
inte(exp(x)/x^2, x from 1 to 2)
	Output:
inte(exp(x)/x^2*d(x))
inte(exp(x)/x^3*d(x))
inte(exp(x)/x^2, x from 1 to 2)

Teach SymbMath derivative of Ei(x) on the first line, and then run again.
	Input:
d(Ei(x)/d(x))=exp(x)/x
inte(exp(x)/x^2*d(x))
inte(exp(x)/x^3*d(x))
inte(exp(x)/x^2, x from 1 to 2)
	Output:
d(Ei(x)/d(x)) = exp(x)/x
constant - exp(x)/x + Ei(x)
constant - 1/2*(x^(-2)*exp(x) + exp(x)/x - Ei(x))
e + Ei(2) - Ei(1) - 1/2*exp(2)

	Users only tell SymbMath a derivative of Ei(x), did not say 
anything about indefinite or definite integrals, about the functions 
exp(x)/x^2 or exp(x)/x^3, did not write any code (a function, 
procedure or subroutine), did not load any file, did not call any 
subroutine. Ei(x) is the exponential integral function, instead of 
a standard function nor the built-in function in SymbMath.
	Why does SymbMath become to have these knowledge ? Because
SymbMath logically deduces these integrals from d(Ei(x)/d(x)).
This is learning from users.

	Example 15.17.2. 
Users want to do integration on sin(x)/x^3. First check if 
integral of sin(x)/x^3 or derivative of Si(x) had already been stored 
in SymbMath.
	Input:
d(Si(x)/d(x))
inte(sin(x)/x^3*d(x))
	Output:
d(Si(x)/d(x))
inte(sin(x)/x^3*d(x))

Users enter a derivative, then ask the integral of sin(x)/x^3.
On this time, only change the first line, and then run again.
	Input:
d(Si(x)/d(x))=sin(x)/x
inte(sin(x)/x^3*d(x))
	Output:
d(Si(x)/d(x)) = sin(x)/x
-1/2*(Si(x) + cos(x)/x + x^(-2)*sin(x)) + constant

		
	15.17.2 Learning complicated indefinite integrals from a
		simple indefinite integral

	Users supply a simple indefinite integral, and then ask many
complicated indefinite integrals.

	Example 15.17.3. 
Check whether SymbMath had already known the following
integrals or not (i.e. to check if these integrals had already been
stored in the data base or knowledge base, these checking would be
omitted if users trust SymbMath without these predefined knowledge).
	Input:
inte(tan(x)^2*d(x))
inte((2*tan(x)^2+x)*d(x))
inte(inte(tan(x)^2+y)*d(x))*d(y))
	Output:
inte(tan(x)^2*d(x))
inte((2*tan(x)^2+x)*d(x))
inte(inte(tan(x)^2+y)*d(x))*d(y))

Users show that an indefinite integral of tan(x)^2 is tan(x)-x, then 
ask indefinite integral of 2*tan(x)^2+x, and a double indefinite 
integral of tan(x)^2+y respect with both x and y. On this time, only 
change the first line, and then run again.

	Input:
inte(tan(x)^2*d(x)) = tan(x) - x
inte((2*tan(x)^2+x)*d(x))
inte(inte(tan(x)^2+y)*d(x))*d(y))

The first input line is to teach SymbMath the indefinite integral of
tan(x)^2. The second and third input lines are to ask the indefinite
integral of 2*tan(x)^2+x and the double indefinite integral of
tan(x)^2+y.

	Output:
inte(tan(x)^2*d(x)) = tan(x) - x
2 (tan(x) - x) + 1/2*x^2
tan(x)*y - x*y + x*y^2

Users will ask inte(inte(tan(x)^2+y^2)*d(x))*d(y)),
inte(inte(tan(x)^2*y)*d(x))*d(y)), inte(x*tan(x)^2*d(x)),
triple integral of tan(x)^2-y+z, or others.


	15.17.3 Learning definite integral from indefinite integral

	Users continue to ask definite integrals as well.

	Input:
inte(inte(tan(x)^2+y, x from 0 to 1), y from 0 to 2)
	Output:
2 tan(1)

	Notice that SymbMath has not had knowledge of all of these
integrals before. Users did nothing, except for only telling SymbMath
one simple indefinite integral of tan(x)^2, did not tell SymbMath
anything about other indefinite integral (e.g. tan(x)^2+y, tan(x)^2+x,
etc.), any indefinite double integral, definite integral, or definite
double integral.


	15.17.4 Learning complicated derivative from simple
		derivative

	SymbMath can learn complicated derivatives from a simple 
derivative, even thought the function to be differentiated is any 
function, not only a standard function.

	Example 15.17.4. 
Users want to differentiate Ci(x)^6, where Ci(x) is a cosine integral 
function instead of a standard function.
	Input:
d(Ci(x)/d(x))
d((Ci(x)^6)/d(x))
	Output:
d(Ci(x)/d(x))
d((Ci(x)^6)/d(x))

Now, alter the first line only, and then run again.
	Input:
d(Ci(x)/d(x))=cos(x)/x
d((Ci(x)^6)/d(x))
	Output:
d(Ci(x)/d(x)) = cos(x)/x
6 Ci(x)^5*cos(x)/x


		15.17.5 Learning integration from algebra

	If users tell SymbMath algebra, SymbMath can learn integrals
from algebra. 

	Example 15.17.5. 
Users input sin(x)^2=1/2-1/2*cos(2*x), then ask integral of sin(x)^2.
	Input:
sin(x)^2=1/2-1/2*cos(2*x)
inte(sin(x)^2*d(x))
	Output:
sin(x)^2 = 1/2 - 1/2*cos(2*x)
1/2*x - 1/4*sin(2*x)

	SymbMath have learned to solve these problems, even though 
the types of problems are different, e.g. learning integrals from 
derivatives or algebra.


	15.17.6 Learning complicated algebra from simple algebra

	SymbMath has the ability to learn complicated algebra from
simple algebra.

	Example 15.17.6. 
Transform sin(x)/cos(x) into tan(x) in an expression.
	Input:
sin(x)/cos(x)=tan(x)
x+sin(x)/cos(x)+a
	Output:
sin(x)/cos(x) = tan(x)
a + x + tan(x)

	Learning is different from programming. On learning, although
users only input one formula, SymbMath will learn many knowledge.
SymbMath is able to learn, as a student does. On programming, users 
have many things to do. First, users define many subroutines for the
individual integrands (e.g. tan(x)^2, tan(x)^2+y^2, 2*tan(x)^2+x, 
x*tan(x)^2, 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.
	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 users need only supply
the necessary facts, SymbMath will determine how to go about
solutions.
	If the learning is saved into a disk as a disk file or library, 
SymbMath will never forget it. 

home help back first fref pref prev next nref lref last post