### 2Introduction

If you are like me, then you are definitely eager to know what is inside this book and how it can be useful to you. Let me take this opportunity to tell you in just a few words, for whom I wrote this book, and what my objective was.

## 1.1 For whom this book was written

Originally I wrote this book for mathematics teachers who want to explore new ways of teaching mathematics with a computer. However, when the first edition of this book came out into the daylight, I found that my readers were not only teachers, but also many students of various courses looking for new ways of solving mathematical problems. I was not surprised when I found that a number of mathematics courses in a few European universities had been built based on this book. In fact, I have made heavy use of large parts of my book for the Computing Foundations course at my own university. Teachers and university instructors can use this book as a starting point to any course where the computer can make a difference and then build the rest of the course around it.

## 1.2 The goal

This book should be considered as the first steps through mathematics with MuPAD. It is not a MuPAD reference book and, in fact, many MuPAD-related topics are not discussed here at all. Nor is it a text for a regular computer-assisted course of mathematics. Instead, it is an exciting excursion through different areas of mathematics assisted by MuPAD. I will show you the basic instructions that are useful for these specific areas. I will explore many topics and show you many examples. However, it may turn out that the particular topic you are interested in has been omitted. If this is the case, you have two possible choices—one, you can try to work it out on your own; and two, you can write to me, and I will try to add this topic in the next edition of the book. In fact some of the topics added in this edition were suggested by my readers.

I have tried to make this book as interesting and approachable as possible. As you have probably noticed by now, the style of this book is me talking to you. This is not only because I think it is easier to read, but also because this writing style is what comes naturally for me.

I like to stay in touch with my readers. For this purpose, a web site has been developed for this book. There you will find my current e-mail address, the source code for the MuPAD programs mentioned in this book, as well as bug fixes and some updates. You can find the web site for my book at www.mupad.com/majewski/.

For the second edition of this book, I have used MuPAD Pro version 3.0. Due to the changes between versions 1.x, version 2.0, and the later versions, some examples and constructions in this book might not work in earlier versions of MuPAD. However, in many cases you should easily be able to convert them to older versions. It is important to mention that MuPAD Pro version 3.0 introduces a completely new standard of mathematical graphics. Therefore, some of the graphical examples presented here cannot be translated to earlier versions at all.

## 1.3 Why we should care about MuPAD

We all know that the teaching of mathematics can benefit a lot from Computer Algebra Systems (CAS). By using CAS, we can visualize mathematical concepts, and especially various types of functions and equations; we can also solve complicated equations without tedious calculations or transform formulae without making difficult-to-find errors. There are several powerful CAS that can be used to teach mathematics. Each of them has its own good features and drawbacks. Sometimes, the drawback can be the price of the package; sometimes its difficult syntax; sometimes hardware requirements that are too high to meet in a school environment.

MuPAD is one of the youngest of these mathematical packages, and for this reason it is not as popular as Maple, Mathematica or Derive. MuPAD’s development started in the early nineties. Until this time, the software market had been dominated by commercial and often very expensive packages. However, in the early nineties we saw a new trend in software development—the so-called open source software. It was at this time that such famous systems as Linux, MuPAD, POV-Ray, and many other free or inexpensive programs were developed.

MuPAD is neither freeware nor open source software, but shares similar beginnings with the latter. Its development started with a few students’ master’s theses at the University of Paderborn. Since then, over the last decade, many students and staff members of the university have contributed to its development. Currently, MuPAD is the most serious competitor for such powerful packages as Mathematica or Maple. For mathematics educators, its innovative features and the low price of the software are especially important. Indeed, if you are going to teach a course with MuPAD, you can find a number of inexpensive ways of getting MuPAD for your classroom—just check the web site http://www.mupad.org/muptan.html to find the best option for you.

## 1.4 What is inside

The first seven chapters of this book are focused on the basics of using MuPAD. We begin with the syntax of MuPAD commands and declarations (chapters 2 and 3), and programming control structures (chapter 4). In chapter 5, we move on to writing procedures and using MuPAD libraries. Chapters 6, 7 and 8 are devoted to graphics in MuPAD. I discuss there the syntax of plotting commands, showing how to plot curves and surfaces and how to develop MuPAD animation. At this point, we move on to my major point of interest — applications of MuPAD in mathematics. In chapter 9, I describe some uses of MuPAD graphics in calculus and geometry. Chapter 10 is devoted to different types of numbers. Finally, in the last four chapters, we move on to elementary algebra (chapter 11), logic and set theory (chapter 12), calculus (chapter 13) and linear algebra (chapter 14).

Each chapter of this book ends with a summary of the MuPAD elements that were introduced in the chapter. At the end of each chapter, I also enclose a set of programming exercises to be done by my readers. Most of these exercises are at a basic level; usually I ask my readers to develop a short MuPAD program or procedure with no more than 20 lines. This will help you to better understand the nature of MuPAD programming, and at the same time to build your confidence in using MuPAD in the classroom. I suppose the sets of exercises should really be much larger. However, I believe that almost any topic in high school or university mathematics can lead to a number of interesting programming activities.

## 1.6 Writing “between”

The best word to describe this book is probably the word “between.” This book was written between many things—different places, different versions of MuPAD, different times, different interests, and different people.

While writing this book I have moved from Far East Asia to the Middle East. The beginning of this book was written in the small city of Macau on the coast of the South China Sea, some of the middle chapters were written in Poland, and the last few chapters were written in Abu Dhabi, in the Persian Gulf. While writing this book, I have thus moved from the tranquility of East Asia to the atmosphere of war in the Middle East after September 11, 2001.

Writing this book, I continued to remain trapped between my two major interests—computer graphics and mathematics. In this book, you will notice a lot of influence of computer graphics. It is for this reason that the chapters about MuPAD graphics occupy about one third of the book. In the second edition of my book, these chapters have been completely rewritten in order to cover the new graphics standard introduced in MuPAD 3.0. I have also added here a large section about animation with MuPAD. However, I still have a feeling that too many things related to graphics are missing here. You will find them in my next book, which will be completely devoted to mathematical graphics with MuPAD.

I used a number of unofficial versions of MuPAD during the writing of the book. I started off with version 2.0; the later chapters however, were written with the alpha and beta tests of version 2.5. The second edition of my book was has been completely rewritten to cover version 3.0. I was thus able to capture some of the most significant changes in MuPAD. A few times, while writing this text, I got the feeling that one feature or another could work in a different way. It was quite surprising for me that some of my suggestions were implemented in MuPAD in a matter of hours or days. Working with the MuPAD team was and still is a real adventure. The ever-changing MuPAD was the biggest challenge for me. Many features and even concepts changed from version to version and definitely may also change in future versions. However, it was a great pleasure to witness such wonderful development.

Finally, I wrote this book between many people and each of them, knowingly or not, had some influence on my work. Let me introduce some of them here.

I shall start with Enrique Wintergerst and Barry MacKichan who, a few years ago, encouraged me to look into MuPAD. This was at the time when MacKichan Software Inc. had just decided to implement MuPAD as the computing engine in their Scientific Workplace® and Scientific Notebook® packages. In fact, thanks to MacKichan Software Inc. I use Scientific Notebook® to write all my texts, including this book, and prepare them for publishing. I cannot imagine how I could write any mathematical text without this wonderful tool.

A number of people from the MuPAD Research Group also had a great influence on my work. Allow me to mention some of them. Frank Postel gave me a lot of hints at the beginning of my MuPAD path, when I was trying to work out some puzzling features of MuPAD. Oliver Kluge, Ralf Hillebrand, Christopher Creutzig, Klaus Drescher, Stefan Wehmeier, Walter Oevel, Jürgen Billing, Torsten Metzner, Andreas Sorgatz and many others are those who were so patient in discussing with me the various features of MuPAD. Christopher and Stefan carefully read my book and suggested many improvements. When talking about the MuPAD team, I must also mention Prof. Benno Fuchssteiner, who invited me to Paderborn and encouraged me to work with his team.

I am very grateful to the many individuals who reviewed the first edition of the book, made valuable suggestions, and brought a large number of errors and omissions to my attention. They include: Dr. Wilhelm Forst from the University of Ulm in Germany, Dr. Friedrich Schwarz from University of Paderborn in Germany, and Dr. Fred Szabo from the Concordia University in Canada.

I need to also mention my son Jakub, who spent a significant amount of time searching for spelling and grammar errors in the manuscript. Furthermore, I could not omit here my wife and daughter, who both had a rather difficult time whenever I tried to concentrate on my work.

Finally, I would like to extend my gratitude to Georgios Dalaras, whose music gave me a lot of joy and inspiration while writing this book.

I thank all of you for your help, encouragement, or at least tolerating my passion for this work.

Miroslaw Majewski, Zayed University, UAE, Spring 2004

© Miroslaw Majewski, Abu Dhabi, Update 25-01-2009