CALE : Learning by Example in Mathematics with Applets in Mathematical Computational Packages †

In this work we present a methodology of “learning by example” assisted by computers in the study of mathematics. We propose the use of mathematical computational packages to program applets aimed to solve mathematical problems. Each time the student runs the applet, a new random instance of the problem is generated, and he is guided, step by step to solve it. The student can repeat the process as many times as necessary until his knowledge is consolidated, by taking a more active role in the process after the first repetitions of several instances.


Introduction
Several methodologies of teaching focused on a given aspect of the learning process are raising the interest of educators, and the study of their effectiveness is getting attention in pedagogical research.To mention two of the most well-known methodologies, we have Problem-Based Teaching and Project-Based Teaching and, of course, their inseparable counterparts, Problem-Based Learning and Project-Based Learning.These methodologies are not excluding and can be used in the classroom in a complementary way.
Another one of such methodologies is Learning by Example.One of the precursors of the explicit use of this pedagogical technique is Hayes-Roth, who noted in [1] the importance of examples in concept learning.Zhu and Simon applied in [2] the methodology of learning from examples, and also of learning by doing, to the teaching of mathematics, and they found it useful to save time in the acquisition of knowledge.Booth et al. analyzed in [3], more specifically, the benefits of presenting worked examples in Algebra classrooms.
In this work we will apply the methodology of Learning by Example jointly with the use of applets created with computational packages in the learning of Algebra.However, the idea is applicable to other mathematical disciplines, as geometry or calculus, and it is also suitable for using in some other quantitative fields such as, for instance, physics or engineering.
Most mathematical computational packages have the ability to generate scripts with a user friendly graphical user interface which allows to enter some input and to present in a visually aesthetic way the computations made with the program.In our examples we have used Mathematica but, of course, the methodology can be used with other computational packages.
A crucial point in the use of applets to implement the methodology of Learning by Example is the generation of random data that can feed the parameters of the problems.For instance, in the applet presented in the Results section, examples of resolution of quadratic equations by completing the square are given.The three coefficients of the equation are taken as random integer numbers between −20 and 20, with the restriction that the coefficient of the quadratic term must be non-zero.In this way the students can be provided with an ample repertoire of many non-repeating examples, so that they have those materials permanently available.Besides, they can work the examples any number of times until they fully understand the topic presented in the applet.
The procedure exposed in the applets can be divided in small steps so that the student can feel comfortable with the pace of the exposition.This detailed argumentation using small steps often cannot be done in the classroom because it would make difficult to give in the course the whole teaching syllabus planned for the subject.In contrast, there is no problem in presenting the solution with a high level of detail in the applets, since in this case there are no time limitations.
In what follows, we will name this method of using applets made with computational mathematical packages to implement Learning by Example Computationally Assisted Learning by Example, and from now on we will call it briefly just by CALE.

Materials and Methods
The program Mathematica [4] is a computing system adapted to scientific computing oriented to mathematical computations in many areas such as algebra, geometry, statistics, etc.It is one of the most well-known mathematical packages, and it is useful not only to assist theoretical and applied research, but also to help in the process of teaching and learning at all levels, as it can be seen in [5].In this paper we are interested in this pedagogical aspect of the program, and in its potential interrelation with the paradigm of Learning by Example in the way studied in CALE.
The core of the applets consists in programming utilizing the usual structures in Mathematica, such as conditionals, loops, procedures and functions, etc., and using also specific commands for mathematical computations, such as, for instance, the command D to find a partial derivative of a function.In this programming task is often practical to use also specific packages, which are useful to store code written in Mathematica and let the programmer use many new functions.For instance, the ANOVA package allows the programmer to do analysis of variance.
The interaction of the applets with the user can be done through control objects in Mathematica, which provide a user-friendly interface for the input and output of the computations.Interactivity between the program, the users, and the different control objects, requires the utilization of dynamic expressions, whose content can be dynamically updated in real time affecting to expressions computed previously.Unlike the case of static expressions, which cannot change in a concrete point in the execution of the program, the value of dynamic expressions can change on-line in the physical point where the variable appears.Information about dynamic expressions and variables can be found in [6].Also, a complete classification and description of the controls available in Mathematica can be found in [7].
The basic structure that we have used in the construction of the applets is as follows: We have used a grid to allocate the elements.Initially, they are hidden by putting the empty string in the corresponding position, except the Begin button, whose pressing triggers the subsequent process, and except the Language action menu.A random instance of the example is created, and the solution of the problem is developed step by step.To move from one step to the following one, the user must press the Continue button.Once the solution has been fully developed (or also in the middle of the process), the user can repeat the process by pressing again the Begin button.
The steps of the process giving the solution are depicted in a panel that is initially hidden and that is made visible when the Begin button is pressed.In some applets the user can introduce some parameters in an input field, so that the randomly generated instance of the problem corresponds to the value of the parameters entered by the user.
The code of the programs is divided in three blocks.In the first one the variables are initialized, and the concrete problem is settled.In the second one, a list formed by grids is constructed.These items will be shown, step by step, each time the student pushes the Continue button.In the third one the interactive framework is settled.It is constituted by the Begin and Continue buttons, the Language menu, and the panel in which the setting of the problem and the steps of the solution are shown.

Results
We have done eight applets using the described methodology.They are related to the teaching of algebra at several levels.All of them are available, as it is indicated at the end of the paper where the Supplementary Materials are described, in a repository of the University of the Basque Country (UPV/EHU).In that repository we will put improved versions of the applets, as well as some new applets that we will develop soon.They can be run by the students in the computer room, if the school or university has a license for Mathematica, or at their homes when the license let them to install the program with a student license derived from the license acquired by the teaching center.
Another free option which does not require to buy a license of Mathematica, is to use the Wolfram CDF player.Although it does not allow to edit or to change the applets, it can be used to run them interactively with all the functionality of the program.
Next, we will show in Figure 1 one of the applets, in which the procedure of completing the square is illustrated.A quadratic equation with random integer coefficients is generated, and it is solved, step by step, by completing the square.It is appropriated for intermediate students, although it could be useful also for students of a course of basic mathematics of the first course in a scientific degree.This applet may help the students to understand the formula for solving a quadratic equation  +  +  = 0, which is  = ± .This formula is often just memorized, and the students do not understand how one can deduce it.

Discussion
The use of applets programmed with mathematical packages engages very well with the methodology of teaching and learning by example.Using these packages lets to generate quickly lots of examples with guided solutions shown step by step.The procedure to find the answer lets the students to adapt the learning process to their necessities, working on as many examples as needed to consolidate their knowledge.
They can also adapt the time dedicated to each step of the solution.In an ideal use, they can also postpone passing to the next step until they have tried to solve the step by themselves, checking after that the correctness of their solution.This can be not so easy to do in their first step, but it will get easier for them to do in the subsequent examples.In this way, students get more involved in the learning process and they take a more active role.
The applets can be presented in several languages, and it is not difficult to adapt them to incorporate new languages without having special programming skills.Initially, the output is shown in three languages: English, Spanish and Basque (Euskera), and the language in use can be changed by selecting it in an action menu.
Four of the applets were used in a course of Commutative algebra in the third course of the Degree in Mathematics at the University of the Basque Country (UPV/EHU) in the academic course 2017/18.In the first call in January, 22 students out of 24 enrolled students attended the examination.20 of them passed the examination, which makes a percentage of 83.33% of the number of enrolled students.The mean of the marks was 6.62 (over 10).
The percentage of students passing the examination was higher in the course 2017/18 than in the 5 previous courses, and the mean of the marks was higher in the course 2017/16 than in 3 out of the 5 previous courses.Nonetheless, with the current data the improvement is not significant enough and more work is necessary to be done in the future to test the effectiveness of the method.

Conclusions
The CALE method allows to join the information and communication technologies and the methodology of learning by example, and hence fits well in the framework of this paradigm of teaching-learning by presenting and working concrete examples.
The CALE method is applicable to topics at several level: elementary school, intermediate school and high education.
The statistics done with respect to the results obtained when the CALE method is used, comparing it with the results in classrooms of the same subject in which the method is not used seems to be promising, as one can see when analyzing the data presented in the previous section.Nonetheless, the current results are not significant enough for the moment.To remedy this, we plan to consider in the future data from several courses in several subjects in different educative levels in which CALE is used and using a wider set of applets.Also, the study can be extended for a period of several years.

Supplementary Materials:
The programs corresponding to the eight applets described in this work can be found in the repository EHUbox of the University of the Basque Country.They can be accessed in the link https://ehubox.ehu.es/s/wD2vD08huf0Hztd.Additional applets which will be developed in the future will be archived in the mentioned repository, as well as files with explanations relative to the applets and other documentation.
Author Contributions: L.M. directed the writing of the paper.J.G. and I.M. (Iraide Mardones) added improvements in the code of the applets.I.M. (Iker Malaina) helped with the making of the graphics and provided computing guidance and assistance.L.M., J.G., L.L., I.M. (Iker Malaina) and I.M. (Iraide Mardones) participated in the design, analysis, writing and revision of the manuscript.All the authors read and approved the final manuscript.