Download as pdf or txt
Download as pdf or txt
You are on page 1of 53

MATLAB Programming Mathematical

Problem Solutions De Gruyter STEM 1st


Edition Dingyü Xue
Visit to download the full and correct content document:
https://textbookfull.com/product/matlab-programming-mathematical-problem-solutions
-de-gruyter-stem-1st-edition-dingyu-xue/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Differential Equation Solutions With MATLAB


Fundamentals and Numerical Implementations De Gruyter
STEM Dingyu Xue

https://textbookfull.com/product/differential-equation-solutions-
with-matlab-fundamentals-and-numerical-implementations-de-
gruyter-stem-dingyu-xue/

Calculus Problem Solutions With MATLAB 1st Edition


Dingyü Xue

https://textbookfull.com/product/calculus-problem-solutions-with-
matlab-1st-edition-dingyu-xue/

C Programming De Gruyter STEM 1st Edition Yuan Dong

https://textbookfull.com/product/c-programming-de-gruyter-
stem-1st-edition-yuan-dong/

Water Resources Management Innovative and Green


Solutions De Gruyter STEM 2nd Edition Brears

https://textbookfull.com/product/water-resources-management-
innovative-and-green-solutions-de-gruyter-stem-2nd-edition-
brears/
Corrosion Prevention Nanoscience Nanoengineering
Materials and Technologies de Gruyter Stem 1st Edition
Berdimurodov Elyor Tukhlievich

https://textbookfull.com/product/corrosion-prevention-
nanoscience-nanoengineering-materials-and-technologies-de-
gruyter-stem-1st-edition-berdimurodov-elyor-tukhlievich/

Scientific Computing with MATLAB Second Edition Dingyu


Xue

https://textbookfull.com/product/scientific-computing-with-
matlab-second-edition-dingyu-xue/

Matlab A Practical Introduction to Programming and


Problem Solving Stormy Attaway

https://textbookfull.com/product/matlab-a-practical-introduction-
to-programming-and-problem-solving-stormy-attaway/

MATLAB A Practical Introduction to Programming and


Problem Solving Stormy Attaway

https://textbookfull.com/product/matlab-a-practical-introduction-
to-programming-and-problem-solving-stormy-attaway-2/

Linear Algebra and Matrix Computations With MATLAB 1st


Edition Dingyü Xue

https://textbookfull.com/product/linear-algebra-and-matrix-
computations-with-matlab-1st-edition-dingyu-xue/
Dingyü Xue
MATLAB® Programming
Also of Interest
Fractional-Order Control Systems, Fundamentals
and Numerical Implementations
Dingyü Xue, 2017
ISBN 978-3-11-049999-5, e-ISBN (PDF) 978-3-11-049797-7,
e-ISBN (EPUB) 978-3-11-049719-9

Calculus Problem Solutions with MATLAB®


Dingyü Xue, 2020
ISBN 978-3-11-066362-4, e-ISBN (PDF) 978-3-11-066697-7,
e-ISBN (EPUB) 978-3-11-066375-4

Linear Algebra and Matrix Computations with MATLAB®


Dingyü Xue, 2020
ISBN 978-3-11-066363-1, e-ISBN (PDF) 978-3-11-066699-1,
e-ISBN (EPUB) 978-3-11-066371-6

Solving Optimization Problems with MATLAB®


Dingyü Xue, 2020
ISBN 978-3-11-066364-8, e-ISBN (PDF) 978-3-11-066701-1,
e-ISBN (EPUB) 978-3-11-066369-3

Differential Equation Solutions with MATLAB®


Dingyü Xue, 2020
ISBN 978-3-11-067524-5, e-ISBN (PDF) 978-3-11-067525-2,
e-ISBN (EPUB) 978-3-11-067531-3
Dingyü Xue
®
MATLAB
Programming
|
Mathematical Problem Solutions
Author
Prof. Dingyü Xue
School of Information Science and Engineering
Northeastern University
Wenhua Road 3rd Street
110819 Shenyang
China
xuedingyu@mail.neu.edu.cn

MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/
trademarks for a list of additional trademarks. The MathWorks Publisher Logo identifies books that
contain MATLAB and Simulink content. Used with permission. The MathWorks does not warrant the
accuracy of the text or exercises in this book. This book’s use or discussion of MATLAB and Simulink
software or related products does not constitute endorsement or sponsorship by The MathWorks of
a particular use of the MATLAB and Simulink software or related products. For MATLAB® and
Simulink® product information, or information on other related products, please contact:

The MathWorks, Inc.


3 Apple Hill Drive
Natick, MA, 01760-2098 USA
Tel: 508-647-700
Fax: 508-647-7001
E-mail: info@mathworks.com
Web: www.mathworks.com

ISBN 978-3-11-066356-3
e-ISBN (PDF) 978-3-11-066695-3
e-ISBN (EPUB) 978-3-11-066370-9

Library of Congress Control Number: 2019955271

Bibliographic information published by the Deutsche Nationalbibliothek


The Deutsche Nationalbibliothek lists this publication in the Deutsche Nationalbibliografie;
detailed bibliographic data are available on the Internet at http://dnb.dnb.de.

© 2020 Tsinghua University Press Limited and Walter de Gruyter GmbH, Berlin/Boston
Cover image: Dingyü Xue
Typesetting: VTeX UAB, Lithuania
Printing and binding: CPI books GmbH, Leck

www.degruyter.com
Preface
Scientific computing is commonly and inevitably encountered in course learning, sci-
entific research and engineering practice for each scientific and engineering student
and researcher. For the students and researchers in the disciplines which are not pure
mathematics, it is usually not a wise thing to learn thoroughly low-level details of re-
lated mathematical problems, and also it is not a simple thing to find solutions of com-
plicated problems by hand. It is an effective way to tackle scientific problems, with
high efficiency and in accurate and creative manner, with the most advanced com-
puter tools. This method is especially useful in satisfying the needs for those in the
area of science and engineering.
The author had made some effort towards this goal by addressing directly the so-
lution methods for various branches in mathematics in a single book. Such a book,
entitled “MATLAB based solutions to advanced applied mathematics”, was published
first in 2004 by Tsinghua University Press. Several new editions are published after-
wards: in 2015, the second edition in English by CRC Press, and in 2018, the fourth
edition in Chinese were published. Based on the latest Chinese edition, a brand new
MOOC project was released in 2018,1 and received significant attention. The number
of the registered students was about 14 000 in the first round of the MOOC course,
and reached tens of thousands in later rounds. The textbook has been cited tens of
thousands times by journal papers, books, and degree theses.
The author has over 30 years of extensive experience of using MATLAB in scientific
research and education. Significant amount of materials and first-hand knowledge has
been accumulated, which cannot be covered in a single book. A series entitled “Profes-
sor Xue Dingyü’s Lecture Hall” of such works are scheduled with Tsinghua University
Press, and the English editions are included in the DG STEM series with De Gruyter.
These books are intended to provide systematic, extensive and deep explorations in
scientific computing skills with the use of MATLAB and related tools. The author wants
to express his sincere gratitude to his supervisor, Professor Derek Atherton of Sussex
University, who first brought him into the paradise of MATLAB.
This MATLAB series is not a simple revision of the existing books. With decades of
experience and material accumulation, the idea of “revisiting” is adopted in author-
ing these books, in contrast to other mathematics and other MATLAB-rich books. The
viewpoint of an engineering professor is established and the focus is on solving var-
ious applied mathematical problems with tools. Many innovative skills and general-
purpose solvers are provided to solve problems with MATLAB, which is not possible
by any other existing solvers, so as to better illustrate the applications of computer
tools in solving mathematical problems in every mathematics branch. It also helps

1 MOOC (in Chinese) address: https://www.icourse163.org/learn/NEU-1002660001

https://doi.org/10.1515/9783110666953-201
VI | Preface

the readers broaden their viewpoints in scientific computing, and even in finding in-
novative solutions by themselves to scientific computing which cannot be solved by
any other existing methods.
The first title in the MATLAB series can be used as an entry-level textbook or refer-
ence book to MATLAB programming, so as to establish a solid foundation and deep un-
derstanding for the application of MATLAB in scientific computing. Each subsequent
volume tries to cover a branch or topic in mathematical courses. These MATLAB books
are suitable for the readers who have already learnt the related mathematical courses,
and revisit the courses to learn how to solve the problems by using computer tools.
It can also be used as a companion in synchronizing the learning of related mathe-
matics courses, and for viewing the course from a different angle. The readers may
expand their knowledge in learning the related courses, so as to better understand
and practice the relevant materials. Bearing in mind the “computational thinking” in
authoring the series, deep understanding and explorations are made for each mathe-
matics branch involved.
This book is the first in the MATLAB series. Systematic illustration of MATLAB pro-
gramming is provided in the book. The commonly used data and statement structures
in MATLAB are introduced first, followed by algebraic and transcendental function
evaluations of matrices, and data manipulations. Flow controls and applications in
MATLAB programming are then introduced, and MATLAB function programming and
skills are provided. Scientific visualization in MATLAB are addressed. Advanced top-
ics such as the designs of MATLAB interface to other languages, object-oriented pro-
gramming and graphical user interface are illustrated, such that a better foundation
can be established for the readers to continue learning scientific computing and the
knowledge of other related mathematical fields.
At the time the books are published, the author wishes to express his sincere grat-
itude to his wife, Professor Yang Jun. Her love and selfless care over the decades pro-
vided the author immense power, which supports his academic research, teaching
and writing.

September 2019 Xue Dingyü


Contents
Preface | V

1 Introduction to computer mathematics languages | 1


1.1 Introduction to solving mathematical problems | 1
1.1.1 Why learn a computer mathematics language? | 1
1.1.2 Analytical and numerical solutions | 5
1.1.3 Development of mathematical packages | 6
1.1.4 Limitations of conventional computer languages | 8
1.2 History of computer mathematics languages | 10
1.2.1 The early days of computer mathematics languages | 10
1.2.2 Representative modern computer mathematics languages | 11
1.3 Three-phase solution of scientific computing problems | 12
1.4 Problems | 14

2 Fundamentals of MATLAB programming | 17


2.1 Command windows and fundamental commands | 18
2.1.1 Regulations in variable names | 18
2.1.2 Reserved constants | 19
2.1.3 Setting of display formats | 20
2.1.4 Low-level operating system commands | 21
2.1.5 Setting of MATLAB working environment | 21
2.1.6 MATLAB workspace and management | 23
2.1.7 Other supporting facilities | 23
2.2 Commonly used data types | 24
2.2.1 Numeric data types | 24
2.2.2 Symbolic data | 26
2.2.3 Generation of arbitrary symbolic matrices | 28
2.2.4 Symbolic functions | 29
2.2.5 Integer and logic variables | 29
2.2.6 Recognition of data types | 29
2.2.7 Sizes and lengths of matrices | 30
2.3 String data type | 30
2.3.1 Expression of string variables | 30
2.3.2 String processing methods | 32
2.3.3 Conversion of string variables | 33
2.3.4 Executions of string commands | 34
2.3.5 Interface of MuPAD language | 35
2.4 Other commonly used data types | 36
2.4.1 Multidimensional arrays | 36
2.4.2 Cell arrays | 37
VIII | Contents

2.4.3 Tables | 38
2.4.4 Structured variables | 41
2.4.5 Other data types | 42
2.5 Fundamental statement structures | 42
2.5.1 Direct assignment statements | 42
2.5.2 Function call statements | 43
2.5.3 Functions with different syntaxes | 43
2.5.4 Colon expressions | 44
2.5.5 Submatrix extractions | 45
2.5.6 Generation of equally spaced row vectors | 46
2.6 Reading and writing of different data types | 46
2.6.1 Reading and writing of data files | 46
2.6.2 Low-level reading and writing commands | 47
2.6.3 Reading and writing of Excel files | 48
2.7 Problems | 50

3 Fundamental mathematical computations | 53


3.1 Algebraic computation of matrices | 53
3.1.1 Transposing, flipping and rotating matrices | 53
3.1.2 Arithmetic operations | 55
3.1.3 Complex matrices and transformations | 56
3.1.4 Powers and roots of matrices | 57
3.1.5 Dot operations | 59
3.2 Logic and comparison operations | 59
3.2.1 Logic operations with matrices | 59
3.2.2 Comparisons of matrices | 60
3.2.3 Searching commands in matrix elements | 60
3.2.4 Attribute judgement | 62
3.3 Computation of transcendental functions | 62
3.3.1 Exponentials and logarithmic functions | 63
3.3.2 Trigonometric functions | 63
3.3.3 Inverse trigonometric functions | 65
3.3.4 Transcendental functions of matrices | 66
3.4 Simplifications and conversions of symbolic expressions | 68
3.4.1 Polynomial operations | 68
3.4.2 Conversions and simplifications of trigonometric functions | 69
3.4.3 Simplification of symbolic expressions | 70
3.4.4 Variable substitution of symbolic expressions | 71
3.4.5 Conversions of symbolic expressions | 72
3.5 Fundamental computations with data | 72
3.5.1 Integer rounding and rationalization of data | 73
3.5.2 Sorting and finding maximum and minimum of vectors | 74
Contents | IX

3.5.3 Mean, variance and standard deviation | 75


3.5.4 Prime factors and polynomials | 76
3.5.5 Permutations and combinations | 78
3.6 Problems | 79

4 Flow control structures of MATLAB language | 83


4.1 Loop structures | 83
4.1.1 The for loop structure | 83
4.1.2 The while loop structure | 86
4.1.3 Loop implementation of iterations | 87
4.1.4 Assistant statements of loop structures | 90
4.1.5 Vectorized implementation of loops | 90
4.2 Conditional structures | 93
4.2.1 Simple conditional structures | 93
4.2.2 General form of conditional structures | 94
4.2.3 Vectorized expressions of piecewise functions | 96
4.3 Switch structures | 98
4.4 Trial structure | 100
4.5 Problems | 101

5 Function programming and debugging | 105


5.1 MATLAB scripts | 105
5.2 Fundamental structures of MATLAB functions | 106
5.2.1 Fundamental function structures | 106
5.2.2 Regulations in function names | 108
5.2.3 Examples of function programming | 108
5.3 Skills of MATLAB function programming | 112
5.3.1 Recursive structures | 112
5.3.2 Functions with variable numbers of inputs and outputs | 114
5.3.3 Fault tolerance manipulation | 116
5.3.4 Global variables | 117
5.3.5 Reading and writing of MATLAB workspace | 118
5.3.6 Anonymous and inline functions | 119
5.3.7 Subfunctions and private functions | 121
5.4 MATLAB function debugging | 122
5.4.1 Debugging of MATLAB functions | 122
5.4.2 Pseudocode and code protection | 125
5.5 MATLAB live editor | 125
5.5.1 Live editor interface | 126
5.5.2 Creating a live document | 126
5.5.3 Execution of embedded code | 128
5.5.4 Embed other objects in live editor | 128
X | Contents

5.5.5 Output of live files | 131


5.6 Problems | 131

6 Two-dimensional graphics | 135


6.1 Drawing two-dimensional plots | 135
6.1.1 Plotting data | 135
6.1.2 Plots of mathematical functions | 139
6.1.3 Plots of piecewise functions | 139
6.1.4 Titles in plots | 141
6.1.5 Plots with multiple vertical axes | 143
6.2 Decoration of plots | 145
6.2.1 Plot decoration with interface tools | 145
6.2.2 LATEX support commands | 146
6.2.3 Superimposing formulas in plots | 148
6.3 Other two-dimensional plotting functions | 149
6.3.1 Polar plots | 150
6.3.2 Plots of discrete samples | 151
6.3.3 Histograms and pie charts | 152
6.3.4 Filled plots | 155
6.3.5 Logarithmic plots | 156
6.3.6 Error bar plots | 157
6.3.7 Dynamic trajectories | 157
6.3.8 Two-dimensional animation | 158
6.4 Plot window partitioning | 159
6.4.1 Regular partitioning | 159
6.4.2 Arbitrary segmentation | 161
6.5 Implicit functions | 162
6.6 Displaying and simple manipulation of images | 165
6.6.1 Input images | 165
6.6.2 Editing and displaying images | 166
6.6.3 Color space conversion | 167
6.6.4 Edge detection | 167
6.6.5 Histogram equalization | 168
6.7 Output of MATLAB graphs | 170
6.7.1 Output menus and applications | 170
6.7.2 Output commands of plots | 171
6.8 Problems | 171

7 Three-dimensional graphics | 175


7.1 Three-dimensional curves | 175
7.1.1 Drawing three-dimensional plots from data | 175
7.1.2 Three-dimensional plots of mathematical functions | 176
Contents | XI

7.1.3 Filled plots | 177


7.1.4 Bar and pie charts | 178
7.1.5 Ribbon plots | 180
7.2 Three-dimensional surfaces | 182
7.2.1 Mesh grids and surfaces | 182
7.2.2 Shading and lights | 186
7.2.3 Three-dimensional surface from images | 188
7.2.4 Representation of functions | 189
7.2.5 Surfaces from scattered data | 190
7.3 Viewpoint setting in three-dimensional plots | 191
7.3.1 Definition of viewpoints | 192
7.3.2 Orthographic views | 193
7.3.3 Setting of arbitrary viewpoints | 193
7.4 Other three-dimensional plots | 194
7.4.1 Contour lines | 194
7.4.2 Quiver plots | 196
7.4.3 Three-dimensional implicit plots | 197
7.4.4 Surfaces of parametric equations | 199
7.4.5 Surfaces of complex functions | 199
7.4.6 Spheres and cylinders | 200
7.4.7 Voronoi diagrams and Delaunay triangulation | 203
7.5 Special treatment of three-dimensional plots | 205
7.5.1 Rotation of surfaces | 205
7.5.2 Axis specification for surfaces | 207
7.5.3 Cutting of surfaces | 208
7.5.4 Patches in surfaces | 208
7.6 Four-dimensional plots | 210
7.6.1 Slices | 210
7.6.2 A volume visualization interface | 212
7.6.3 Creating and playing of three-dimensional animations | 213
7.7 Problems | 214

8 MATLAB and its interface to other languages | 217


8.1 Introduction to C interfaces with MATLAB | 218
8.1.1 Environment setting of compilers | 218
8.1.2 Data types in Mex | 218
8.1.3 Mex file structures | 220
8.1.4 Mex file programming and procedures | 223
8.2 Mex manipulation of different data types | 225
8.2.1 Processing of various input and output data types | 225
8.2.2 Reading and writing of string variables | 226
8.2.3 Processing of multidimensional arrays | 228
XII | Contents

8.2.4 Processing of cells | 229


8.2.5 Reading and writing of MAT files | 231
8.3 Direct calling of MATLAB functions from C programs | 233
8.4 Standalone program conversion from MATLAB functions | 238
8.5 Problems | 239

9 Fundamentals in object-oriented programming | 241


9.1 Concepts of object oriented programming | 241
9.1.1 Classes and objects | 241
9.1.2 Data type of classes and objects | 242
9.2 Design of classes | 243
9.2.1 The design of a class | 244
9.2.2 Design and input of classes | 245
9.2.3 Class display | 246
9.3 Programming of overload functions | 247
9.3.1 Overload addition functions | 247
9.3.2 Simplification functions via like-term collection | 248
9.3.3 Overload subtraction functions | 249
9.3.4 Overload multiplication functions | 250
9.3.5 Overload power functions | 252
9.3.6 Assignment and extraction of fields | 253
9.4 Inheritance and extension of classes | 254
9.4.1 Definition and display of extended classes | 254
9.4.2 Overload functions for ftf objects | 256
9.4.3 Frequency domain analysis of fractional-order transfer
functions | 258
9.5 Problems | 259

10 Graphical user interface design using MATLAB | 261


10.1 Essentials in graphical user interface design | 261
10.1.1 The relationships of objects in MATLAB interface | 261
10.1.2 Window objects and properties | 262
10.1.3 Commonly used properties in window objects | 262
10.1.4 Extraction and modification of object properties | 265
10.1.5 Easy dialog boxes | 267
10.1.6 Standard dialog boxes | 269
10.2 Fundamental controls in interface design | 272
10.2.1 Commonly used controls supported | 273
10.2.2 Commonly used properties in controls | 274
10.2.3 Getting the handles | 275
10.3 Graphical user interface design tool – Guide | 276
10.4 Advanced techniques in interface design | 286
Contents | XIII

10.4.1 Design of menu systems | 287


10.4.2 Design of toolbars | 287
10.4.3 Embedding ActiveX controls | 289
10.5 APP packaging and publication | 291
10.6 Problems | 291

Bibliography | 293

MATLAB function index | 295

Index | 301
1 Introduction to computer mathematics languages
1.1 Introduction to solving mathematical problems
Mathematical problems are essential in almost all aspects of scientific and engineer-
ing research. The mathematical models should normally be established first, then the
solutions of the models under investigation can be obtained. Specific knowledge is
required for the establishment of mathematical models, which needs the expertise of
the researchers, and with the established models, the numerical and analytical ap-
proaches presented in this series can be used to solve the problems. In this chap-
ter, a brief introduction to computer mathematical problems is proposed. It will be
illustrated through simple examples why computer mathematics languages should
be learned. A concise history of the development of computer mathematics languages
and mathematical tools will be introduced.

1.1.1 Why learn a computer mathematics language?

It is well known that manual formulation of mathematical problems is a useful skill


if the problems are not too complicated. Unfortunately, for a great variety of mathe-
matical problems in real world, manual formulation is laborious or even impossible.
Computer tools must be employed for tackling these problems.
There are essentially two ways for solving mathematical problems with comput-
ers. One is to implement the existing numerical algorithms with general-purpose com-
puter languages, such as C and Fortran. The other way is to use specific computer
languages with good reputation. Appropriate computer languages such as MATLAB,
Mathematica[17] , and Maple[13] can be adopted. In this book, the languages are referred
to as the computer mathematics languages. Numerical algorithms can only be used to
tackle computation problems with numbers, while for problems like finding the solu-
tions to the quadratic equation ax 2 + bx + c = 0, where a, c, d are not given numerical
values but symbolic variables, numerical algorithms, no matter how sophisticated,
cannot be adopted. The professional computer mathematics languages capabilities
should be adopted instead.
The term “mathematical computation” will be used throughout the series,
whereas the term really means both numerical and analytical computation of so-
lutions to mathematical problems. Normally, analytical solutions are explored first,
and if there are no analytical solutions, numerical solutions are obtained.
The following examples are shown so that the readers may understand and ap-
preciate the necessity of using the computer mathematics languages.

https://doi.org/10.1515/9783110666953-001
2 | 1 Introduction to computer mathematics languages

Example 1.1. Consider a simple problem. What is the last digit of 2 0192 019 ?

Solutions. If computers are not used, all the mathematicians know about the result
is its last digit, since tricks can be used in finding it. In fact, the solution is useless
in reality, since if you spend some money to buy something, you will never care what
the last digit is. It makes almost no difference to you whether the last digit is 1 or 9.
What you care about is what the highest digit is and how many digits there are in
total. It is always useful if you can find all the digits. However, these problems cannot
be solved at all without the use of computers. Dedicated computer software tools are
also essential. If computer mathematics languages are used, for instance, with the
command in MATLAB

>> a=sym(2019)^2019

all the digits in the result can be obtained as

a = 11 755 143 827 466 954 841 312 ⋅ ⋅ ⋅ 732 793 278 321 979.

There are 6 674 digits in total, which may fill about two pages of the book.

Example 1.2. In conventional calculus courses, the readers may have learnt how to
find the derivative of a given function, with manual formulation approach. Emphasis
is on manual computation in conventional courses. Assuming that a function f (x) is
given as f (x) = cos x/(x2 + 3x + 2), are you able to derive manually d4 f (x)/dx4 ?

Solutions. The reader may use the methods learnt in calculus courses to compute
the derivatives. The first-order derivative df (t)/dx should be evaluated first, and then
the subsequent derivatives such as second-, third- and fourth-order derivatives of the
given function f (x) can be derived in turn. Even higher-order derivatives can be formu-
lated in this way. The procedure is, in fact, more suitable for computers. With MATLAB,
the fourth-order derivative of the function f (x) can be calculated using a single line

>> syms x; f=cos(x)/(x^2+3*x+2); y=diff(f,x,4) % find the derivative

and the result obtained is

d4 f (t) cos x 12 cos x 24 cos x


= 2 + +
dx4 x + 3x + 2 (x2 + 3x + 2)2 (x 2 + 3 x + 2)3
12 cos x(2x + 3)2 48 cos x(2x + 3)2 24 cos x(2x + 3)4
− 3
− 4
+ 5
(x2 + 3x + 2) (x 2 + 3x + 2) (x 2 + 3x + 2)
24 sin x(2x + 3)3 4 sin x(2x + 3) 16 sin x(2x + 3)
+ 4
− 2
− 3
(x2 + 3x + 2) (x 2
+ 3x + 2) (x 2 + 3x + 2)
8 sin x(8x + 12) 6 cos x(2x + 3)(8x + 12)
− 3
− 4
.
(x2 + 3x + 2) (x 2 + 3x + 2)
1.1 Introduction to solving mathematical problems | 3

It is immediately seen from this example that manual evaluation is a laborious


and tedious work. Even a slightly careless manipulation may lead to erroneous results.
Well, with tools such as MATLAB, d100 f (x)/dx100 can be derived within four seconds!

Example 1.3. How to find the determinant of an n × n matrix?

Solutions. The determinant of a large matrix is recommended to be evaluated with


the algebraic cofactor method in linear algebra courses. For an n × n matrix, the deter-
minant can be evaluated from determinants of n matrices of size (n − 1) × (n − 1). The
determinant of each (n − 1) × (n − 1) matrix, on the other hand, can be evaluated from
the determinants of n−1 matrices of size (n−2)×(n−2). In this manner, the determinant
of an n × n matrix can be found eventually as the algebraic sum of a certain number of
determinants of 1 × 1 matrices, i. e., the scalars themselves. It can then be concluded
that the exact expression of the determinant of any given square matrix exists.
Unfortunately, the above conclusion neglected the computability and feasibility
issues. The computation load could be extremely heavy, requiring (n − 1)(n + 1)! + n
operations. For instance, if n = 25, the number of floating point operations (flops) is
9.68 × 1027 , which is equivalent to 204 years of computation on a supercomputer of
125.4 trillion (1.254 × 1017 ) flops (i. e., the fastest supercomputer in the world in 2016,
Sunway TaihuLight). Although elegant and instructive, the algebraic cofactor method
is not practically feasible. In genuine applications, usually the determinants of even
larger-sized matrices are expected, which is evidently not feasible by directly applying
the mentioned algebraic cofactor method.
Various numerical algorithms are available in numerical analysis courses. Unfor-
tunately, under the double-precision data type, the algorithms may lead to unexpected
errors for nearly all matrices. Consider now the Hilbert matrix defined as

1 1/2 1/3 ... 1/n


[ 1/2 1/3 1/4 ... 1/(n + 1) ]
[ ]
H=[
[ .. .. .. .. .. ].
]
[ . . . . . ]
[1/n 1/(n + 1) 1/(n + 2) ... 1/(2n − 1)]

If n = 80, a wrong determinant det(H) = 0 is found if double-precision data type


is adopted. If computer mathematics language such as MATLAB is used, the exact so-
lution of the determinant of the matrix is found within 1.23 seconds as
1
det(H) = ≈ 1.00979 × 10−3 790 .
990 301 014 669 934 778 788 676 784 101 ⋅ ⋅ ⋅ 00 000
⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟
a total of 3 789 digits, with many omitted

The evaluation of determinants needs computer mathematics languages, and es-


pecially for special matrices, symbolic methods should be used to avoid errors. The
following MATLAB statements can be used:

>> tic, H=sym(hilb(80)); d=det(H); toc, d


4 | 1 Introduction to computer mathematics languages

Example 1.4. Solve the following two systems of equations:

{ x + 3y3 + 2z 2 = 1/2,
x + y = 35, {
{ 2
{ { x + 3y + z 3 = 2,
2x + 4y = 94, {
{ 3 2
{x + 2z + 2y = 2/4.

Solutions. It can be seen that the first is the well-known chicken–rabbit cage problem
in Chinese legends. Even if computers are not used, the solution can easily be found.
With MATLAB, the following statements can be used:

>> syms x y; [x0,y0]=vpasolve(x+y==35,2*x+4*y==94)

With powerful computer tools such as MATLAB, the solution of the second equation
is as simple as the former when solving the chicken–rabbit cage problem, from the
user’s viewpoint. The user can represent the equations directly in symbolic expres-
sions. Then with the same vpasolve() function call, all the 27 solutions can be found
directly. When the roots are substituted back to the original equations, the error norm
is as small as 10−34 .

>> syms x y z; % declare symbolic variables


f1(x,y,z)=x+3*y^3+2*z^2-1/2; f2(x,y,z)=x^2+3*y+z^3-2;
f3(x,y,z)=x^3+2*z+2*y^2-2/4; [x0,y0,z0]=vpasolve(f1,f2,f3),
size(x0), norm([f1(x0,y0,z0) f2(x0,y0,z0) f3(x0,y0,z0)])

Example 1.5. Solve the linear programming problem given below

min (−2x1 − x2 − 4x3 − 3x4 − x5 )


{
{ 2x2 +x3 +4x4 +2x5 ⩽54,
{
{
x s. t.{3x1 +4x2 +5x3 −x4 −x5 ⩽62,
{
{
{
{x1 ,x2 ⩾0, x3 ⩾3.32, x4 ⩾0.678, x5 ⩾2.57.

Solutions. Since the problem involves constrained optimization, the analytical un-
constrained method by setting the derivatives of the objective function with respect
to each decision variable xi to zero cannot be used. With linear programming tools in
MATLAB, the following statements can be employed:

>> clear; P.f=[-2 -1 -4 -3 -1]; P.Aineq=[0 2 1 4 2; 3 4 5 -1 -1];


P.Bineq=[54 62]; P.lb=[0;0;3.32;0.678;2.57]; P.solver=’linprog’;
P.options=optimset; x=linprog(P) % linear programming problem solution

With MATLAB, the solution can be obtained directly as x1 = 19.7850, x2 = 0, x3 =


3.3200, x4 = 11.3850, and x5 = 2.5700.
1.1 Introduction to solving mathematical problems | 5

With the algorithms in numerical analysis or optimization courses, conventional


constrained optimization problems can be solved. However, if other special con-
straints are introduced, for instance, the decision variables are constrained to be
integers, the integer programming must be used. There are not so many books intro-
ducing software that can tackle the integer and mixed-integer programming problems.
If MATLAB is used, the solution to this example problem is easily found as x1 = 19,
x2 = 0, x3 = 4, x4 = 10, x5 = 5.

Example 1.6. In many other courses, such as on complex-valued functions, integral


transforms, data interpolation and fitting, partial differential equations, probability
and statistics, can you still solve typical problems after the final exams?

Example 1.7. With the rapid development of modern science and technology, many
new mathematical theories, such as those of fuzzy and rough sets, artificial neural
networks, and evolutionary computing algorithms have emerged. It would be a hard
and time consuming task to use such theories to solve particular problems, without
using specific computer tools. If low-level programming is expected, the researcher
needs to fully understand the technical contents of the theories, as well as how to
implement the algorithms with computer languages. However, if the existing tools and
frameworks are used instead, the problems can be solved in a much simpler manner.

In many courses, such as on electronics, electric circuits, mechanical systems,


power electronics, automatic control theory, and motor drive, more sophisticated ex-
amples and problems are deliberately avoided due to the lack of high-level computer
software tools support. If MATLAB or other computer mathematics languages are used
extensively in those courses, complicated practical problems can be tackled. Even in-
novative solutions to some specific problems can be found.

1.1.2 Analytical and numerical solutions

The development of modern science and engineering depends heavily on mathemat-


ics. Unfortunately, the viewpoints of pure mathematicians are different from other
scientists and engineers. Mathematicians are often interested in the existence and
uniqueness of the solutions. They are interested in finding the analytical or closed-
form solutions to mathematical problems. If solutions are not possible, they may in-
vent special conditions such that their theoretical method can be carried out. Perfect
solutions may usually be found, while unfortunately, the solutions of their revised
problems may not be suitable for the original problems. Scientists and engineers are
interested in finding the exact solutions to the problems, and usually do not care much
about the trivial details on how the results are found, provided that the results are
meaningful and reliable. If the exact solutions are not available, scientists and engi-
6 | 1 Introduction to computer mathematics languages

neers are happy to accept approximate solutions obtained with the numerical tech-
niques.
In real applications, it is often seen that analytical solutions do not exist. For ex-
a
2 2
ample, the definite integral ∫ e−x dx is known to have no analytical solution. Math-
√π
0
ematicians invented a special function erf(a) to solve the problem, and do not care
what the numerical value is in particular. To find an approximate solution, engineers
and scientists have to adopt numerical approaches.
Another example is the irrational number π. It is known that π has no closed-
form expression. The ancient Chinese scientist and astronomer Zu Chongzhi (429–
500), also known as Tsu Ch’ung-chih, found in about ce480 that the value is between
3.1415926 and 3.1415927. This value is accurate enough in most engineering and sci-
entific applications. Even using the less accurate value of 3.14 found by Archimedes
(bce287–bce212) in about bce250(?), the solutions to most practical problems are of-
ten acceptable.
In many scientific and engineering areas, numerical techniques have already been
widely used. For example, in aerospace and control, numerical solutions to ordinary
differential equations and linear algebra problems are successfully used for centuries.
In mechanical engineering, finite element methods (FEMs) have been adopted in solv-
ing partial differential equations. For simulation experiments in engineering and non-
engineering areas, numerical solutions to differential and difference equations are the
core techniques. In hi-tech developments, fast Fourier transform (FFT) based digital
signal processing has been recognized as an essential task. There is no doubt that if
one masters one or more practical computer tools, the capabilities in solving scientific
computation problems will be significantly boosted, and innovative achievement can
be expected.

1.1.3 Development of mathematical packages

The achievement in digital computer and dedicated software fueled the developments
of numerical and analytical scientific computation techniques. At the early stages of
numerical computation techniques, some well-established software packages played
an important part. These packages include the linear algebra package LINPACK[4] and
the eigenvalue-based package EISPACK[5, 16] developed in the USA, the NAG package
by the Numerical Algorithm Group in the UK, and the package in the well-accepted
book Numerical Recipes[14] . They are widely accepted by the users and with good rep-
utation.
The famous packages such as LINPACK and EISPACK are both developed for nu-
merical linear algebra computations. EISPACK and LINPACK packages were originally
1.1 Introduction to solving mathematical problems | 7

written in Fortran. An example is given next to show how to use these packages in
solving linear algebra problems.

Example 1.8. The eigenvalues of an N × N real matrix A are expressed as W R and W I


for the real and imaginary parts, respectively. The eigenvectors Z are also expected. As
suggested by EISPACK, the following code is needed in the sequentially subroutine-
calling sequence:

CALL BALANC(NM,N,A,IS1,IS2,FV1)
CALL ELMHES(NM,N,IS1,IS2,A,IV1)
CALL ELTRAN(NM,N,IS1,IS2,A,IV1,Z)
CALL HQR2(NM,N,IS1,IS2,A,WR,WI,Z,IERR)
IF (IERR.EQ.0) GOTO 99999
CALL BALBAK(NM,N,IS1,IS2,FV1,N,Z)

Apart from the main body of the program, the user should also write a few lines to
input or initialize the matrix A to the above program and return or display the results
obtained by adding some display or printing statements. Then, the whole program
should be compiled and linked with the EISPACK library to generate an executable
program. It can be seen that the procedure is quite complicated. Moreover, if another
matrix is to be investigated, the whole procedure might be repeated, which makes the
solution process even more complicated.

Unlike EISPACK and LINPACK, Numerical Recipes and NAG packages include nu-
merical subroutines in various mathematics branches. The names of the subroutines
are not quite informative, since they are composed of letters and numbers. Beginners
may find it difficult to select a suitable subroutine for their own problems, not to men-
tion the sophisticated syntaxes of the subroutines. Programming using the packages
is not an easy job. Each subroutine comes with many input arguments. They are some-
times too complicated to use.
Numerical Recipes is a widely used numerical package used worldwide. There are
different versions such as C, Fortran, and Pascal. It is suitable for use directly by sci-
entific researchers and engineers. There are altogether about 200 high-efficiency and
practical subroutines in the package. Generally, the subroutines are of high-standard
and reliable, therefore, trusted by the researchers.
For the readers with good knowledge of languages such as Fortran and C, it is im-
mediately found that programming for ordinary scientific computing problems is usu-
ally complicated, especially when matrices and graphics are involved. For instance, if
one wants to solve a linear equation system, low-level programming is involved. The
user has to write a solver, for instance, with Gaussian elimination method, then the
program has to be compiled and linked. If there is no ready-to-use subroutine, the
users must input the whole subroutine into a computer. For such a method, a subrou-
tine with about 100 source code lines is expected, and it is rather a time-consuming
8 | 1 Introduction to computer mathematics languages

work to validate the code and to ensure the correctness of the code. For a complicated
task such as eigenvalue computation with OR method, about 500 source code lines are
required. Any slight carelessness may lead to errors in the final results. These pack-
ages sometimes have limitations, since most of them may fail if complex matrices are
involved.
The mathematical software packages are continuously evolving, with the leading-
edge numerical algorithms being implemented. More reliable, efficient, stable,
and faster packages are provided. For example, in numerical linear algebra, a new
LaPACK[1] is becoming the leading package. Unlike the original purposes of the old
packages, the objectives of the new ones are changed. LaPACK is no longer aiming at
providing facilities or libraries for direct user applications. Instead, LaPACK provides
support to professional software and languages. For example, MATLAB and a free-
ware Scilab[8] are not using the packages of LINPACK and EISPACK, instead LaPACK
is adopted as the low-level supporting library.
Mathematical software packages appeared in certain mathematical branches so
that one may call them from Fortran, C/C++, or other programming languages. Specific
interface can be made so that the packages can be called from MATLAB. There are
also significantly many mathematical toolboxes written in MATLAB or other computer
mathematical languages. Once one has certain typical mathematical problems to be
solved, the related official toolboxes in MATLAB can be called directly, since they are
usually written by experts with very good reputation in the corresponding fields. The
results obtained may be considered reliable, compared with those written in low-level
commands.

1.1.4 Limitations of conventional computer languages

Many people are using conventional computer languages, such as C and Fortran, in
their research. Needless to say, these languages were very useful, and they were the
low-level supporting languages of the computer mathematics languages such as MAT-
LAB. However, for the modern scientific and engineering researchers, these languages
are not adequate for solving their complicated computational problems. For instance,
even very experienced C programmers may not be able to write C code to find the indef-
inite integral of a given function, such problems involve knowledge of mathematical
mechanization. Even for numerical computations, there are limitations. Here two ex-
amples are given to illustrate the problems.

Example 1.9. It is known that the Fibonacci sequence can be generated with the fol-
lowing recursive formula: a1 = a2 = 1, and ak = ak−1 + ak−2 , k = 3, 4, . . . Compute its
first 100 terms.

Solutions. Data type for each variable must be assigned first in C programming lan-
guage. Since the terms in the sequence are integers, it is natural to select the data types
1.1 Introduction to solving mathematical problems | 9

int or long. If int is selected, the following C program can be written:

#include <stdio.h>
main()
{ int a1, a2, a3, i;
a1=1; a2=1; printf("%d %d ",a1,a2);
for (i=3; i<=100; i++)
{ a3=a1+a2; printf("%d ",a3); a1=a2; a2=a3;
}}

The Fibonacci sequence can be obtained simply by using the program. But wait. Are
the results obtained correct? If the program is executed, from the 24th term on, the
value of the sequence becomes negative, and from that term on, the subsequent terms
are sometimes positive, sometimes negative. It is obvious that some peculiar things
must have happened in the program. The problem is caused by the int data type,
since its range is (−32 767, 32 767). If a term is beyond this range, wrong results are
generated. Even if long data type is adopted instead, the correct answers may only
last till about 10 more terms. To solve the problem of finding the first 100 terms, or
even more, of the Fibonacci sequence is certainly beyond the capabilities of average
C users, or even experienced C programmers. Extremely slight carelessness may lead
to misleading results.
With the use of MATLAB, such trivial things need not be considered. The following
code can be written directly:

>> a=[1 1]; % the first two terms


for i=3:100, a(i)=a(i-1)+a(i-2); end; a(end) % loop structure

Besides, for more accurate representation of the terms, symbolic data type can be used
instead, by substituting the first statement with a=sym([1,1]). In this case, the 100th
term is a100 = 354 224 848 179 261 915 075, and even more, the 10 000th term may be
obtained, with about 32 seconds of computation, and all the 2 089 decimal digits can
be found, whose display may occupy more than half a page of the book.

Example 1.10. Write a general purpose C program to compute the product of two ma-
trices A and B.

Solutions. If A is an n × p matrix and B is a p × m one, it is known from linear algebra


that matrix C can be obtained, whose elements are
p
cij = ∑ aik bkj , i = 1, . . . , n, j = 1, . . . , m.
k=1

Based on the above algorithm, the kernel part of C program can be written in a
triple-loop structure:
10 | 1 Introduction to computer mathematics languages

for (i=0; i<n; i++){for (j=0; j<m; j++){


c[i][j]=0; for (k=0; k<p; k++) c[i][j]+=a[i][k]*b[k][j];}}

It seems again that the problem can be solved with these simple statements. Unfor-
tunately, there is still a serious problem in the short code, the multiplicability of the
two matrices is not considered. Imprecisely speaking, when the number of columns of
A equals the number of rows of B, the product can be found, otherwise, they are not
multiplicable. To solve the problem, an extra if statement is needed.

if cols of A != rows of B, display an error message

Unfortunately, by introducing such a statement, a new problem emerges. In mathe-


matics, when A or B is a scalar, the product of A and B can be found, however, this
case is expelled by introducing the above if statement. To solve the problem, more if
statements are expected to check the scalar cases.
Even though the above modifications are made, this program is not a universal
one, since complex matrices were not considered at all. More statements are needed
to make the program universal.
It can be seen from the example that if C or similar computer languages are used,
the programmers must be very careful to consider all the possible cases. If one or more
cases were not considered, wrong or misleading results may be obtained. In MATLAB,
such trivial issues need not be considered at all. The command C=A*B can be used
directly. If the two matrices are multiplicable, the product can be obtained, otherwise,
an error message will be displayed to indicate why the product cannot be found.

1.2 History of computer mathematics languages


1.2.1 The early days of computer mathematics languages

Earlier in 1978, Professor Cleve Moler, the Chairman of the Department of Computer
Science at the University of New Mexico, found that the students in his linear algebra
class had difficulties in solving linear algebraic problems with the then most advanced
LINPACK and EISPACK packages. He conceived and implemented MATLAB (MATrix
LABoratory). The first release of MATLAB was then freely distributed. Cleve Moler and
Jack Little co-founded MathWorks in 1984 to further develop the MATLAB language.
By that time, control system theory involving state space methods was rapidly de-
veloping. Significantly many algebraic problems needed to be solved. The emergence
of MATLAB and its Control Systems Toolbox attracted the researchers’ attention from
the control community. More and more control oriented toolboxes were developed by
the distinguished scholars in different control disciplines, which popularized MAT-
LAB. It was first initiated by a numerical mathematician, but MATLAB impact and
reputation were first built up in the control community and became the top-selected
1.2 History of computer mathematics languages | 11

general purpose computer language of control scientists and engineers. With more
new dedicated toolboxes appearing in many other engineering disciplines, MATLAB
is becoming the de facto standard language in science and engineering.
The well-established Mathematica and Maple, which appeared later, are also
widely used computer mathematics languages.
Besides, the free language Scilab developed by INRIA in France can also be used
in solving certain scientific computing problems. The most significant benefit is that it
is a free and open-source software. Unfortunately, its behavior in scientific computing
has not reached the standard of the commercial languages such as MATLAB.

1.2.2 Representative modern computer mathematics languages

In the scientific world, there are three leading computer mathematics languages with
high reputation, namely MATLAB by MathWorks, Maple by Waterloo Maple, and Math-
ematica by Wolfram Research. They each have their own distinguishing advantages.
For example, MATLAB is easy in programming and good at numerical computation,
while Mathematica and Maple are more powerful in tackling pure mathematics prob-
lems.
The numerical capability of MATLAB is much stronger. Besides, various nice tool-
boxes by well-known scholars can be adopted to tackle the problems with high effi-
ciency. In addition, the symbolic computation engine in Maple was used to carry out
symbolic computations, and now it is replaced by the MuPAD engine. Therefore, the
symbolic computation capabilities are essentially the same as those of Mathematica
and Maple for average users in engineering and science.
MATLAB is extensively used in this book series. It appears that the series is pre-
senting some mathematical problems in certain depth. However, the ultimate objec-
tive of the series is to help the readers, after understanding roughly the mathematical
background, to bypass the tedious and complex technical details of mathematics and
find the reliable and accurate solutions to the mathematical problems of interest with
the help of MATLAB computer mathematics language. There is no doubt that the read-
ers’ capability in tackling mathematical problems can be significantly enhanced after
reading the books.
This the first volume in the series. MATLAB programming and skills are fully pre-
sented in the book. The applications of MATLAB in various branches of mathematics
are covered in other volumes, where thorough explorations on related materials in
other fields are studied with the tools provided in MATLAB. A MATLAB-based solu-
tion pattern is created such that much more information can be obtained from differ-
ent viewpoints. Creative research can be carried out with the help of MATLAB, and the
new results unknown to others may be discovered with the extensive use of the tools.
12 | 1 Introduction to computer mathematics languages

1.3 Three-phase solution of scientific computing problems


A three-phase methodology proposed by the author is used throughout the series
in presenting mathematical problem solutions[18] . The three phases are respectively
“What,” “How”, and “Solve.” In the “What” phase, the physical explanation of the
mathematical problem to be solved is presented. Even though the readers have not yet
learnt the corresponding mathematics course, they can understand roughly what the
problem is really about. In the “How” phase, the mathematical problem is described
in a manner understandable by MATLAB. In the final “Solve” phase, appropriate MAT-
LAB functions are called to solve the problem directly. If there is an existing MATLAB
function, the syntax of the function is presented, and if not, a universal function is
written to solve the problem.

Example 1.11. Let us revisit Example 1.5, where a linear programming problem was
involved. The philosophy used in the series will be illustrated.

min −2x1 − x2 − 4x3 − 3x4 − x5


{
{ 2x2 +x3 +4x4 +2x5 ⩽54,
{
{
x s. t.{3x1 +4x2 +5x3 −x4 −x5 ⩽62,
{
{
{
{x1 ,x2 ⩾0, x3 ⩾3.32, x4 ⩾0.678, x5 ⩾2.57.

Solutions. To solve such a problem, even though the reader may have not learnt any
optimization related courses, the solution can be obtained in the following three-
phases.
(1) “What” phase. In this book, we shall explain first the physical meaning of the
mathematical problem. In this particular example, the mathematical formula means
that under the simultaneous inequality constraints

2x + x3 + 4x4 + 2x5 ⩽ 54,


{ 2
{
3x + 4x2 + 5x3 − x4 − x5 ⩽ 62,
{ 1
{
{x1 , x2 ⩾ 0, x3 ⩾ 3.32, x4 ⩾ 0.678, x5 ⩾ 2.57,

we need to find a set of decision variables xi to minimize the objective function f (x) =
−2x1 − x2 − 4x3 − 3x4 − x5 . Even though the reader may have not studied optimization,
it is not difficult to understand what he/she is expected to do from the mathematical
formulas.
(2) “How” phase. We now illustrate how to represent the problem in MATLAB. The
code in Example 1.5 can be used to establish variable P. The mathematical problem
should be expressed in a format understandable by MATLAB.

>> clear; P.f=[-2 -1 -4 -3 -1]; % objective function


P.Aineq=[0 2 1 4 2; 3 4 5 -1 -1]; P.Bineq=[54 62]; % inequalities
P.solver=’linprog’; P.lb=[0;0;3.32;0.678;2.57]; % bounds
P.options=optimset; % the whole linear programming problem in P
1.3 Three-phase solution of scientific computing problems | 13

(3) “Solve” phase. We call the solver linprog() directly and get the result.

>> x=linprog(P) % call linprog() function to solve the problem

Example 1.12. Artificial neural network is an intelligent mathematical tool widely


used today. It is useful in data fitting and classification. Assume that a set of samples
can be generated with

>> x=0:0.1:pi; y=exp(-x).*sin(2*x+2);

Create an artificial neural network model for the samples and fit the curve of the func-
tion.

Solutions. If you do not want to spend time learning theoretical aspects of artificial
neural networks, and only want to use a neural network to solve the data fitting prob-
lem, consider the three-phase solution pattern presented earlier. Then a few minutes
of time are needed to learn what is an artificial neural network and how it can be used.
The data fitting problem can be tried with neural networks. Let us start with the three-
phase solution method:
(1) What is an artificial neural network? There is no need to understand the techni-
cal details. An artificial neural network can be regarded as an information processing
unit. It accepts several channels of input signals, and after internally processing the
signals, the output signals can be generated.
(2) How to create a neural network in MATLAB? With function fitnet(), a blank
neural network can be created. With the function train(), the parameters of the net-
work can be obtained from the given samples, and the structure of the usable neural
network is obtained as shown in Figure 1.1.

>> net=fitnet(5); net=train(net,x,y), view(net)

(3) Now we use this neural network to solve a data fitting problem. Generating a
set of data to fit, the output of the neural network can be obtained. Comparisons with

Figure 1.1: Structure of an artificial neural network.


14 | 1 Introduction to computer mathematics languages

the theoretical data are shown in Figure 1.2. It can be seen that even though we do
not have time to learn the details of neural networks, we are still able to use them to
solve our problems. Also the user may modify the structures and parameters of neural
networks, for instance, the number of neurons, so as to observe the quality of data
fitting through practice.

>> t0=0:0.01:pi; y1=net(t0); y0=exp(-t0).*sin(2*t0+2);


plot(t0,y0,t0,y1)

Figure 1.2: Fitting results with artificial neural network.

It can be seen by browsing the series that significantly many mathematical formu-
las are involved. Some of the knowledge seems to be rather deep in mathematics. If the
readers feel unconfident about their own mathematical background, they should not
worry about that. The aim of the book series is not to present technical details in math-
ematics, rather, the eventual goal is to help the readers first understand roughly the
physical meaning of the related mathematical problems, then by avoiding the trivial
details in mathematics, send the problems to computers in a way understandable by
computers, and wait for the results. With the powerful tools provided by computers,
our capability in dealing with practical scientific computing may well beat the first-
class mathematicians who are not professionals in using computer tools. Through the
study of the series, practical capabilities in scientific computing will be significantly
boosted.

1.4 Problems
1.1 Install MATLAB environment on your machine and run the command demo. From
the dialog boxes and menu items of the demonstration program, experience the
powerful facilities provided in MATLAB.
Another random document with
no related content on Scribd:
tiesimme kaikki, että prokuraattori otti talossaan Mitjan vastaan aivan
vastoin tahtoaan, ainoastaan siksi, että prokuraattorin rouva jostakin
syystä piti tätä hauskana miehenä, — prokuraattorin rouva, joka oli
mitä sivein ja kunnioitettavin, ja joka mielellään erinäisissä
tapauksissa, etupäässä pikkuasioissa, pani puolisonsa tahtoa
vastaan. Mitja oli muuten käynyt heidän kodissaan jokseenkin
harvoin.) Siitä huolimatta rohkenen otaksua, — jatkoi puolustaja, —
että niinkin itsenäisesti ajattelevassa ja luonteeltaan oikeamielisessä
miehessä kuin minun opponenttini on, on saattanut syntyä onnetonta
klienttiäni kohtaan jossakin määrin harhaan osunut ennakkoluulo. Oi,
sehän on niin luonnollista: onneton mies on täysin ansainnut, että
häneen suhtaudutaan jopa ennakkoluuloisestikin. Ja loukattu
siveellinen tunne, sekä vieläkin enemmän loukattu esteettinen tunne,
ei toisinaan voi heltyä. Tietysti lahjakkaan syyttäjän puheessa me
kaikki kuulimme ankaran analyysin syytetyn luonteesta ja teoista,
ankaran kriitillisen suhtautumisen asiaan, ja ennen kaikkea esitettiin
niin syviä psykologisia tarkasteluja asian olemuksen selvittämiseksi
meille, että perehtyminen näihin syvyyksiin ei ollenkaan ole
mahdollinen, jos suhtautuu jossakin määrinkin tarkoituksellisesti ja
pahansuovasti syytetyn persoonaan. Mutta onhan asioita, jotka ovat
vielä pahempia, vielä tuhoisampia tämmöisissä tapauksissa kuin
kaikkein ilkeämielisin ja tarkoituksellisin suhtautuminen asiaan. Juuri
silloin nimittäin, jos meidät on esimerkiksi saanut valtaansa
eräänlainen niin sanoakseni taiteellinen leikittely, taiteellisen
luomisen tarve, niin sanoakseni romaanin sepittäminen, varsinkin jos
olemme Jumalalta saaneet suuret lahjat psykologian alalla. Jo
Pietarissa, vasta tehdessäni lähtöä tänne, minulle huomautettiin
ennakolta — ja tiesinhän minä sen itsekin ilman mitään
ennakkohuomautuksia, — että saan täällä opponentikseni sangen
syvän ja hienon psykologin, joka jo kauan sitten on tällä
ominaisuudellaan saavuttanut eräänlaisen erikoislaatuisen maineen
meidän vielä nuoressa lakimiesmaailmassamme. Mutta psykologia,
hyvät herrat, vaikka se onkin syvämielinen asia, muistuttaa kuitenkin
keppiä, jossa on kaksi päätä (naurahdus yleisön joukossa). Oi, te
annatte minulle tietysti anteeksi arkisen vertaukseni; minä en kykene
puhumaan hyvin kaunopuheisesti. Mutta otanpa esimerkin, —
ensimmäisen, mikä sattuu muistumaan mieleeni syyttäjän puheesta.
Syytetty juostessaan yöllä puutarhassa pakoon kiipeää aidan yli ja
iskee vaskisella survimella maahan lakeijan, joka on tarttunut hänen
jalkaansa. Sitten hän heti hyppää takaisin puutarhaan ja puuhailee
kokonaista viisi minuuttia maahan tuupertuneen tarkastelussa
koettaen päästä selville, oliko hän tappanut tämän vai eikö. Ja nyt
syyttäjä ei millään ehdolla ota uskoakseen todeksi syytetyn väitettä,
että hän oli hypännyt ukko Grigorin luo säälistä. »Ei, voiko muka olla
sellaista tunteellisuutta semmoisella hetkellä; se on luonnotonta, hän
hyppäsi alas nimenomaan päästäkseen varmuuteen: onko elossa
vai kuollut hänen tihutyönsä ainoa todistaja, ja sillä hän siis todistikin
tehneensä tämän tihutyön, koska hän ei voinut hypätä puutarhaan
minkään muun syyn, viettymyksen tai tunteen johdosta.» Siinä on
psykologia; mutta ottakaamme sama psykologia ja soveltakaamme
se asiaan toisesta päästä lähtien, niin tulos on aivan yhtä
todenmukainen. Murhaaja hyppää alas varovaisuudesta,
päästäkseen varmuuteen, onko todistaja elossa vai eikö, mutta
kuitenkin hän on juuri-ikään jättänyt murhaamansa isän huoneeseen,
syyttäjän oman todistuksen mukaan, äärettömän raskauttavan
todistuskappaleen itseänsä vastaan, nimittäin rikkireväistyn käärön,
johon oli kirjoitettu, että siinä oli ollut kolmetuhatta. »Jos hän olisi
vienyt tämän käärön mennessään, niin ei kukaan koko maailmassa
olisi tietänyt, että käärö oli ollut olemassa ja että siis syytetty oli
ryöstänyt rahat.» Näin lausui syyttäjä itse. No, yhteen asiaan,
nähkääs, ei riittänyt varovaisuutta, mies joutui pois suunniltaan,
pelästyi ja pakeni jättäen lattialle todistuskappaleen, mutta kun hän
kaksi minuuttia myöhemmin löi maahan ja tappoi toisen miehen, niin
heti samassa ilmenee sydämetön ja harkitseva varovaisuuden tunne
meidän suureksi mielihyväksemme. Mutta olkoon, olkoon, että se oli
niin: siinäpä psykologian hienous onkin, että tämmöisissä
olosuhteissa minä nyt olen verenhimoinen ja terävänäköinen kuin
kaukaasialainen kotka, mutta seuraavassa silmänräpäyksessä
sokea ja arka kuin vähäpätöinen myyrä. Mutta jos minä olen niin
verenhimoinen ja julman harkitseva, että tehtyäni murhan hyppäsin
alas vain katsoakseni, onko elossa vai ei se, joka voi todistaa minua
vastaan, niin mitä syytä luulisi minulla olevan puuhailla tämän uuden
uhrini ääressä kokonaista viisi minuuttia ja hankkia siinä kenties
uusia todistajia vastaani? Miksi kostutin nenäliinani pyyhkimällä verta
nujertamani miehen päästä, joten nenäliinasta sitten tulee niinikään
todistuskappale minua vastaan. Ei, jos me kerran olemme niin
harkitseva ja kovasydäminen, niin eikö olisi ollut parempi, että alas
hypättyämme olisimme kolhaisseet maassa makaavaa palvelijaa
vielä jonkin kerran päähän sillä samalla survimella tappaaksemme
hänet aivan lopullisesti, ja sitten olisimme olleet aivan huoleton, kun
todistaja olisi raivattu pois tieltä? Ja lopuksi, minä hyppään alas
ottaakseni selville, onko hengissä vai ei se, joka voi todistaa minua
vastaan, mutta jätän samaan paikkaan tielle toisen todistajan,
nimittäin sen saman survimen, jonka minä sieppasin kahden naisen
asunnosta ja jonka he molemmat aina voivat tuntea omakseen ja
sitten todistaa minun ottaneen sen heiltä. Enkä minä sitä edes
unohtanut tielle enkä pudottanut hajamielisyydessäni ja ollessani
suunniltani: ei, me nimenomaan viskasimme pois aseemme, sillä se
löydettiin noin viidentoista askelen päästä siitä paikasta, missä
Grigori tuupertui maahan. Kysytään, miksi me sitten teimme niin?
Siksipä juuri sen teimmekin, että mielemme tuli katkeraksi, kun
olimme tappaneet ihmisen, vanhan palvelijan, ja siksi me
harmistuneena ja kiroten paiskasimme pois survimen joka oli ollut
murha-aseena, muulla tavalla ei asia voinut olla, miksi se muuten
olisi paiskattu sellaisella vauhdilla? Jos taas saatoimme tuntea surua
ja sääliä ihmisen tappamisesta, niin se johtui siitä, että emme olleet
tappaneet isäämme. Jos olisimme murhanneet isämme, niin emme
olisi säälistä hypänneet alas toisen maahan lyödyn luo, silloin olisi
ollut valalla toinen tunne, ei silloin ollut aikaa sääliä, vaan oli
ajateltava itsensä pelastamista, se on tietysti selvää. Päinvastoin,
toistan sen, olisimme murskanneet hänen kallonsa lopullisesti
emmekä puuhailleet hänen tähtensä viisi minuuttia. Oli sijaa säälille
ja jalolle tunteelle juuri sen tähden, että omatunto sitä ennen oli
puhdas. Siinä on siis jo toinen psykologia. Minähän, herrat
valamiehet, tahallani turvauduin nyt itsekin psykologiaan
osoittaakseni havainnollisesti, että sen pohjalla voi tehdä millaisia
päätelmiä tahansa. Kaikki riippuu siitä, kenen käsissä se on.
Psykologia houkuttelee kaikkein vakavimpiakin ihmisiä sepittämään
romaania ja aivan vastoin heidän tahtoaan. Minä puhun liiallisuuksiin
menevästä psykologiasta, herrat valamiehet, eräänlaisesta sen
väärinkäyttämisestä. —

Tässä kohtaa kuului taaskin hyväksyviä naurahduksia yleisön


joukosta, ja nauru kohdistui prokuraattoriin. En ryhdy esittämään
seikkaperäisesti puolustajan puhetta kokonaisuudessaan, otan siitä
vain muutamia paikkoja, muutamia pääkohtia.

11.
Rahoja ei ollut. Ryöstöä ei tapahtunut.

Puolustajan puheessa oli yksi kohta, joka hämmästytti kaikkia, —


nimittäin se, jossa hän kokonaan kielsi noiden onnettomien
kolmentuhannen ruplan olemassaolon ja siis myöskin ryöstön
mahdollisuuden.

— Herrat valamiehet, — alkoi puolustaja, — tässä asiassa


hämmästyttää jokaista muualta tullutta ja ennakkoluulotonta ihmistä
kuvaava erikoisuus, nimittäin: syytös ryöstöstä ja samalla kertaa
täydellinen mahdottomuus tosiasiallisesti osoittaa, mitä oikeastaan
on ryöstetty. On muka ryöstetty rahaa, nimenomaan kolmetuhatta, —
mutta onko noita rahoja edes ollut olemassa, sitä ei tiedä kukaan.
Ajatelkaahan: ensiksikin, kuinka me saimme tietää, että nuo
kolmetuhatta olivat olemassa, ja kuka ne oli nähnyt? Ne oli nähnyt ja
siihen, että ne oli pantu päällekirjoituksella varustettuun kääröön, oli
viitannut ainoastaan palvelija Smerdjakov. Hän oli kertonut tästä jo
ennen katastrofia syytetylle ja tämän veljelle Ivan Fjodorovitšille.
Asiasta oli annettu tieto myös rouva Svetloville. Mutta ei kukaan
näistä kolmesta henkilöstä ollut kuitenkaan nähnyt rahoja, ne oli
nähnyt ainoastaan Smerdjakov, mutta nyt herää itsestään kysymys:
jos olisikin totta, että ne olivat olemassa ja että Smerdjakov oli ne
nähnyt, niin milloin hän oli nähnyt ne viimeksi? Entäpä jos herra oli
ottanut nuo rahat pois pieluksen alta ja pannut takaisin lippaaseen
sanomatta siitä mitään hänelle? Huomatkaa, että Smerdjakovin
sanojen mukaan rahat olivat vuoteen sisällä, patjan alla; syytetyn
täytyi repiä ne esille patjan alta, mutta vuode oli aivan koskematon,
ja tämä on tarkasti mainittu pöytäkirjassa. Kuinka syytetty ei
ollenkaan rypistänyt mitään vuoteesta eikä sen lisäksi vielä verisillä
käsillään ollenkaan tahrannut aivan uusia, hienoja makuuvaatteita,
jotka juuri sinä päivänä oli vuoteeseen pantu? Mutta meille
sanotaan: entä käärö lattialla? Tuosta kääröstäpä juuri kannattaakin
hiukan puhua. Olin äsken hiukan ihmeissäni: ryhtyessään puhumaan
tästä kääröstä suurikykyinen syyttäjä yhtäkkiä itse, — kuuletteko,
hyvät herrat, itse, — lausui siitä puheessaan, juuri siinä paikassa,
jossa hän osoittaa, miten järjetön on se otaksuma, että murhaaja oli
Smerdjakov: »jos ei tuota päällystä olisi ollut, jos ei se olisi jäänyt
lattialle todistuskappaleeksi, jos ryöstäjä olisi vienyt sen
mennessään, niin ei kukaan koko maailmassa olisi saanut edes
tietää, että oli ollut olemassa käärö ja siinä rahoja ja että siis syytetty
oli ryöstänyt rahat.» Siis ainoastaan tuo reväisty paperipala
päällekirjoituksineen on itse syyttäjänkin tunnustuksen mukaan
aiheuttanut syytetyn syyttämisen ryöstöstä, »muutenhan ei kukaan
olisi tietänyt ryöstöä olleenkaan eikä kenties rahojenkaan
olemassaolosta.» Mutta todistaako vain se, että tuo paperipala oli
lattialla, siinä olleen rahoja ja että rahat on ryöstetty? »Mutta»,
vastataan, »Smerdjakovhan näki ne käärössä», mutta milloin, milloin
hän näki ne viimeksi, sitä minä kysyn. Minä olen puhunut
Smerdjakovin kanssa, ja hän sanoi minulle nähneensä ne kaksi
päivää ennen katastrofia. Mutta miksi minä en voisi otaksua
esimerkiksi sellaista seikkaa, että ukko Fjodor Pavlovitš
sulkeutuneena huoneeseensa ja hysteerisen kärsimättömästi
odottaessaan lemmittyään, yhtäkkiä joutessaan sai päähänsä ottaa
käärön esille ja avata sen: »Mitäpä», muka, »kääröstä, kenties hän
ei vielä uskokaan, mutta kun näytän hänelle kolmekymmentä
sataruplasta yhdessä nipussa, niin eiköhän se tee voimakkaampaa
vaikutusta, taitaapa nousta sylki suuhun», ja hän repäisee
kirjekuoren, ottaa siitä rahat ja heittää kuoren lattialle isännän
oikeudella ja tietysti pelkäämättä sitä minään todistuskappaleena.
Kuulkaa, herrat valamiehet, onko mitään sen mahdollisempaa kuin
tämmöinen otaksuma ja tämmöinen tosiasia? Miksi se olisi
mahdotonta? Mutta jos jotakin tuommoista saattoi tapahtua, niin
silloinhan syyte ryöstöstä raukeaa itsestään: ei ollut rahoja, ei siis
tapahtunut ryöstöäkään. Jos käärön päällys oli lattialla
todistuskappaleena siitä, että siinä oli ollut rahaa, niin miksi minä en
voi vakuuttaa päinvastaista, nimittäin että päällys oli lattialla juuri sen
tähden, ettei siinä enää ollut rahoja, jotka sitä ennen siitä oli ottanut
itse isäntä? »Niin, mutta minne ovat siinä tapauksessa rahat
joutuneet, jos ne oli kääröstä ottanut itse Fjodor Pavlovitš, hänen
talostaan ei etsittäessä niitä löydetty?» Ensiksikin osa rahoista
löydettiin hänen lippaastaan, ja toiseksi hän saattoi ottaa rahat
kääröstä jo aamulla tai edellisenä päivänä, käyttää niitä muulla
tavoin, antaa ne pois, lähettää ne muualle, vieläpä muuttaa mieltään
ja kokonaan muuttaa toimintasuunnitelmaansa pitämättä kaiken
tämän ohessa ollenkaan tarpeellisena ilmoittaa tästä ennakolta
Smerdjakoville. Mutta jos on olemassa edes mahdollisuus otaksua
tämmöistä — niin kuinka voidaan niin itsepintaisesti ja niin varmasti
syyttää syytettyä siitä, että hän on tehnyt murhan ryöstääkseen, ja
väittää ollenkaan ryöstön tapahtuneen? Tällä tavoinhan me
siirrymme romaanien alalle. Sillä jos vakuuttaa, että jokin esine on
ryöstetty, niin täytyy näyttää tuo esine tai ainakin epäämättömästi
todistaa sen olleen olemassa. Mutta sitä ei kukaan edes ole
nähnytkään. Äskettäin Pietarissa eräs nuori mies, melkein poika
vielä, kahdeksantoistavuotias vähäpätöinen katukaupustelija, meni
keskellä kirkasta päivää kirves mukanaan rahanvaihtoliikkeeseen ja
tavattomalla, tyypillisellä röyhkeydellä tappoi liikkeen isännän ja vei
mennessään tuhatviisisataa ruplaa rahaa. Noin viiden tunnin kuluttua
hänet vangittiin ja hänen hallustaan löydettiin kaikki nuo
puolitoistatuhatta, lukuunottamatta viittätoista ruplaa, jotka hän jo oli
ennättänyt tuhlata. Sitäpaitsi liikeapulainen, joka murhan tapahduttua
oli palannut puotiin, ilmoitti poliisille ei ainoastaan varastetun
rahamäärän suuruutta vaan myös minkälaisia rahoja se oli, montako
minkin arvoista seteliä, paljonko kultarahoja ja minkä arvoisia, ja
vangitulta murhaajalta löydettiin juuri ne setelit ja rahat. Lisäksi vielä
murhaaja tunnusti täydellisesti ja avomielisesti, että hän oli tehnyt
murhan ja vienyt mukanaan juuri ne rahat. Tätä, herrat valamiehet,
minä nimitän syyllisyyden todistamiseksi! Tässä minä tiedän ja näen
ja tunnen rahat käsissäni enkä voi sanoa, ettei niitä ole tai ettei niitä
ole ollut. Onko niin laita nyt käsiteltävässä jutussa? Ja kuitenkin on
kysymyksessä elämä ja kuolema, ihmisen kohtalo. »Niin», sanotaan,
»mutta sinä yönähän hän kekkeröi, syyti ympärilleen rahoja, hänellä
havaittiin olevan puolitoistatuhatta ruplaa, — mistä hän ne otti?»
Mutta juuri siksi, että osoitettiin olevan vain puolitoistatuhatta eikä
toista puolta rahamäärästä voitu löytää eikä osoittaa missään
olevan, juuri siksi on selvää ja todistettua, että nuo rahat saattoivat
olla aivan muita rahoja eivätkä koskaan olleet missään käärössä
olleetkaan. Kun laskettiin ajan kulku (ja hyvin tarkasti) valmistavaa
tutkimusta toimitettaessa, niin havaittiin ja todistettiin, että syytetty ei
juostessaan palvelijatarten luota virkamies Perhotinille ollut
poikennut kotiinsa eikä minnekään muuallekaan ja sen jälkeen oli
kaiken aikaa toisten ihmisten parissa eikä siis voinut erottaa puolta
kolmestatuhannesta ja piilottaa niitä jonnekin kaupungissa. Tämäpä
seikka olikin syynä siihen syyttäjän otaksumaan, että rahat on
piilotettu johonkin rakoon Mokrojen kylässä. Eiköhän vain Udolfin
linnan maanalaisiin holveihin, hyvät herrat? Eikö tämä otaksuma
todellakin ole haaveellinen, romaaniin sopiva? Ja huomatkaa, jos
raukeaa vain tämä otaksuma, nimittäin että rahat on piilotettu
Mokrojeen, — niin koko syytös ryöstöstä lentää ilmaan, sillä missä
ovat, minne ovat joutuneet silloin nuo puolitoistatuhatta? Millä
ihmeen tavalla ne ovat voineet kadota, jos on todistettu, ettei syytetty
ole missään käynyt? Ja tämmöisillä romaaneilla me olemme valmiit
tuhoamaan ihmiselämän! Sanotaan: »Kuitenkaan hän ei ole osannut
selittää, mistä hän otti nuo puolitoistatuhatta, jotka löydettiin hänen
hallustaan, ja sitäpaitsi kaikki tiesivät, että ennen tätä yötä hänellä ei
ollut rahoja.» Kuka sen tiesi? Mutta syytetty on antanut selvän ja
varman selityksen siitä, mistä hän otti rahat, ja jos tahdotte, herrat
valamiehet, jos tahdotte, — niin ei koskaan ole voinut eikä voi olla
mitään uskottavampaa kuin tämä todistus eikä sitäpaitsi mitään
syytetyn luonteelle ja sielulle ominaisempaa. Syyttäjä on mieltynyt
omaan romaaniinsa: heikkotahtoinen mies, joka oli päättänyt ottaa
morsiamensa hänelle niin häpeällisesti tarjoamat kolmetuhatta, ei
muka voinut erottaa niistä puolta ja ommella sitä pussiin, päinvastoin
hän, jos olisi ommellutkin, olisi joka toinen päivä ratkonut pussin auki
ja noppinut satasen kerrallaan ja sillä tavoin vienyt siitä kaikki
kuukauden kuluessa. Muistakaa, että tuo kaikki esitettiin sellaisella
äänensävyllä, joka ei suvaitse mitään vastaväitteitä. Mutta entäpä
jos asia tapahtuikin aivan toisin, entäpä jos te sepititte romaanin,
mutta siinä on aivan toinen henkilö? Siinäpä se onkin, että te olette
luonut aivan toisen henkilön! Kenties väitetään: »On todistajia siihen,
että hän pani menemään Mokrojen kylässä kaikki nuo neiti
Verhovtsevilta otetut rahat kuukautta ennen katastrofia, kaikki
yhdellä kertaa, viimeistä kopeekkaa myöten, eikä siis voinut panna
niistä toista puolta erilleen.» Mutta keitä ovat nuo todistajat? Kuinka
uskottavia nämä todistajat ovat, se on oikeudessa jo nähty. Sitäpaitsi
näyttää leipäpala toisen kädessä aina suuremmalta. Lopuksi ei
ainoakaan noista todistajista ole itse laskenut niitä rahoja, vaan
ainoastaan arvioinut silmämäärältä. Todistihan todistaja Maksimov
syytetyllä olleen käsissään kaksikymmentätuhatta. Nähkääs, herrat
valamiehet, kun kerran psykologiassa on kaksi päätä, niin sallikaa
minun tässäkin ottaa käytäntöön toinen pää ja katsokaamme, onko
tulos sama.

Kuukautta ennen katastrofia neiti Verhovtsev uskoi syytetyn


huostaan postitse lähetettäväksi kolmetuhatta ruplaa, mutta
kysytään: oliko oikein, että ne uskottiin niin häpäisevällä ja niin
alentavalla tavalla kuin äsken saimme kuulla? Neiti Verhovtsevin
ensimmäinen todistus samasta asiasta oli toisenlainen, kokonaan
toisenlainen; toisessa todistuksessa taas me kuulimme vain
suuttumuksen ja koston huutoja, kauan salassa olleen vihan huutoja.
Mutta jo se seikka, että todistaja yhden kerran, ensimmäisessä
todistuksessaan, todisti väärin, antaa meille oikeuden päätellä, että
toinenkin todistus voi olla väärä. Syyttäjä »ei tahdo, ei uskalla»
(hänen omat sanansa) kajota tähän romaaniin. Olkoon, en minäkään
siihen kajoa, mutta otan kuitenkin itselleni vapauden vain
huomauttaa, että jos puhdas ja moraalisessa suhteessa korkealla
tasolla oleva henkilö, jommoinen korkeasti kunnioitettava neiti
Verhovtsev kieltämättä on, jos tällainen henkilö, sanon minä, katsoo
voivansa yhtäkkiä oikeudessa muuttaa ensimmäistä todistustaan
suoranaisena tarkoituksenaan syöstä syytetty turmioon, niin on
selvää sekin, ettei hän ole antanut tuota todistustaan
intohimottomasti, kylmäverisesti. Kielletäänkö meiltä todellakin
oikeus päätellä, että kostonhimoinen nainen on voinut monessa
kohdin liioitella? Niin, nimenomaan liioitella sitä häpeää ja alennusta,
joka liittyi hänen rahantarjoukseensa. Päinvastoin rahat tarjottiin juuri
sillä tavoin, että ne sentään saattoi ottaa vastaan, varsinkin niin
kevytmielinen mies kuin meidän syytettymme. Pääasia on, että hän
uskoi silloin pian saavansa isältään nuo kolmetuhatta, jotka tämä
tilien mukaan oli hänelle velkaa. Se oli kevytmielistä, mutta juuri
kevytmielisyydessään hän oli varmasti vakuutettu, että isä ne antaa,
että hän ne saa ja siis aina voi lähettää postissa neiti Verhovtsevin
hänelle uskomat rahat ja suorittaa velkansa. Mutta syyttäjä ei
mitenkään tahdo myöntää mahdolliseksi, että hän oli saattanut
samana päivänä, jolloin häntä syytettiin, erottaa saamistaan rahoista
puolet ja ommella ne pussiin: »Ei ole hän, muka, sellainen luonne, ei
voinut olla sellaisia tunteita.» Mutta itsehän te huusitte, että
Karamazov on leveä luonne, itsehän te huusitte kahdesta
äärimmäisestä pohjattomasta syvyydestä, jotka Karamazov kykenee
näkemään. Karamazov on juuri sellainen luonne, jossa on kaksi
puolta, kaksi pohjatonta syvyyttä, että hän tuntiessaan mitä
hillittömintä juomisen halua voi pysähtyä, jos jokin asia toiselta
puolen saa osakseen hänen huomionsa. Mutta toinen puoli, sehän
oli rakkaus, — juuri tuo uusi rakkaus, joka silloin oli syttynyt kuin
ruuti, rakkaus, mutta tähän rakkauteen tarvittiin rahoja, ne olivat
enemmän, oi, paljon enemmän tarpeen siihen kuin edes
juominkeihin tuon saman lemmityn kanssa. Jos tämä sanoo hänelle:
»Olen sinun, en huoli Fjodor Pavlovitšista», ja hän ottaa hänet ja vie
pois, — niin silloin olisi millä vie. Sehän on tärkeämpää kuin
juominki. Tätäkö ei Karamazov ymmärtäisi? Tämähän häntä juuri
kivistikin, tämä huoli, — mitä epätodennäköistä siis siinä on, että hän
pani nuo rahat erilleen ja piilotti ne kaiken varalta? Mutta aika kuluu
eikä Fjodor Pavlovitš maksa syytetylle kolmeatuhatta, päinvastoin
kuuluu päättäneen käyttää ne juuri niillä houkutellakseen puoleensa
hänen lemmittynsä. »Jos Fjodor Pavlovitš ei maksa, niin silloinhan
minä olen Katerina Ivanovnan edessä varas.» Ja silloin syntyy
hänen mielessään ajatus, että hän menee ja panee nuo
puolitoistatuhatta, joita hän yhä edelleen kantaa rintansa päällä
pussissa, neiti Verhovtsevin eteen ja sanoo tälle: »Minä olen lurjus,
mutta en varas.» Nytpä siis on kaksinkertainen syy varjella noita
puoltatoistatuhatta kuin silmäterää, ei ensinkään avata pussia eikä
noppia pois sen sisällystä sadan ruplan erissä. Miksi te ette myönnä
syytetyllä olevan kunniantuntoa? Ei, hänessä on kunniantuntoa,
otaksukaamme, että se ei ole oikeata, otaksukaamme, että se eksyy
sangen usein harhaan, mutta se on olemassa, se on aivan
intohimona, ja hän on osoittanut sen. Mutta asia kuitenkin mutkistuu,
mustasukkaisuuden tuskat kohoavat huippuunsa, ja yhä samat,
samat entiset kaksi kysymystä kummittelevat yhä piinallisempina
syytetyn kiihtyneissä aivoissa. »Minä annan rahat takaisin Katerina
Ivanovnalle: mutta millä varoilla minä vien pois Grušenjkan?» Jos
hän hurjasteli sillä tavoin, joi itsensä juovuksiin ja remusi
ravintoloissa koko tuon kuukauden ajan, niin ehkäpä se tapahtui juuri
sen tähden, että mieli tuntui katkeralta, olo sietämättömältä. Nämä
kaksi kysymystä kärjistyivät lopulta siinä määrin, että saattoivat
hänet viimein epätoivoon. Hän lähetti nuoremman veljensä isän luo
pyytämään tältä kolmeatuhatta viimeisen kerran, mutta malttamatta
odottaa vastausta hän syöksyi tämän luo itse ja pieksi ukkoa
todistajien nähden. Tämän jälkeen tietysti ei ollut ketään, jolta saisi
rahaa, piesty isä ei anna. Saman päivän iltana hän lyö rintaansa,
juuri rinnan yläosaan, jossa on tuo pussi, ja vannoo veljelleen, että
hänellä on keino, joka estää häntä tulemasta konnaksi, mutta että
hän kuitenkin jää siksi, sillä hän näkee edeltäpäin, ettei hän käytä
tuota keinoa, ei riitä henkistä voimaa, ei riitä luonteenlujuutta. Miksi,
miksi syyttäjä ei usko Aleksei Karamazovin todistusta, joka annettiin
niin puhtain mielin, niin vilpittömästi, valmistamatta ja uskottavasti?
Miksi hän päinvastoin tahtoo pakottaa minut uskomaan jossakin
raossa tai Udolfin linnan kellareissa oleviin rahoihin? Samana iltana,
keskusteltuaan veljensä kanssa, syytetty kirjoittaa tuon onnettoman
kirjeen, ja tämä kirje onkin kaikkein tärkein, kaikkein suurenmoisin
todistuskappale siitä, että syytetty on tehnyt ryöstön! »Pyydän
kaikilta ihmisiltä, ja jos ihmiset eivät anna, niin tapan isäni ja otan
hänen patjansa alta, ruusunpunaisella nauhalla köytetystä kääröstä,
kunhan vain Ivan matkustaisi pois», — siinä on, muka, täydellinen
murhan ohjelma, kuinka siis hän ei olisi murhaaja? »Pantiin toimeen
kirjoitetun mukaisesti!» huudahtaa syyttäjä. Mutta ensiksikin kirje on
juopuneen kirjoittama ja se on kirjoitettu hirveän kiihtyneessä tilassa;
toiseksi taaskin hän kirjoittaa kääröstä Smerdjakovin sanojen
mukaan, sillä itse hän ei kääröä nähnyt, ja kolmanneksi kirjoitus on
kirjoitus, mutta tehtiinkö kirjoitetun mukaisesti, millä sen voi todistaa?
Saiko syytetty käärön pieluksen alta, löysikö hän rahat, oliko niitä
edes olemassa? Ja rahojenko tähden syytetty sinne juoksi,
muistakaahan, muistakaahan! Hän ei syöksynyt päistikkaa
ryöstämään, vaan ainoastaan ottamaan selville, missä oli tuo nainen,
joka oli saanut hänet huolestumaan, — ei hän siis juossut ohjelman
mukaan, kirjoituksen mukaan, hän ei siis juossut panemaan toimeen
harkittua ryöstöä, vaan juoksi yhtäkkiä, sattumalta, hurjan
mustasukkaisuuden valtaamana! »Niin», sanotaan, »mutta kuitenkin
hän juostuaan perille ja tehtyään murhan otti myös rahat.» Mutta
tekikö hän loppujen lopuksi murhan vai eikö? Ryöstöä koskevan
syytöksen minä torjun inhoten: ei saa syyttää ryöstöstä, jollei voi
täsmälleen osoittaa, mitä on ryöstetty, se on selviö! Mutta tekikö hän
murhan, murhasiko ryöstämättä? Onko se todistettu? Eiköhän sekin
ole romaani?

12.

Eikä murhaakaan tapahtunut

— Herrat valamiehet, tässä on kysymys ihmisen hengestä, ja


täytyy olla varovaisempi. Me kuulimme syyttäjän itsensä todistavan,
että aivan viimeiseen päivään asti, tähän päivään, tuomion päivään
asti, hän epäröi, syyttäisikö syytettyä täysin harkitusta murhasta,
epäröi siihen asti kuin tänään oikeudelle esitettiin tuo onneton
»humalainen» kirje. »Pantiin toimeen aivan kuin kirjoituksen
mukaan!» Mutta toistan taaskin: hän juoksi lemmittynsä luokse, tätä
etsimään, ainoastaan ottamaan selkoa, missä tämä oli. Sehän on
eittämätön tosiasia. Jos tämä olisi sattunut olemaan kotona, niin hän
ei olisi juossut mihinkään, vaan olisi jäänyt hänen luokseen eikä olisi
pitänyt sitä, minkä oli luvannut kirjeessä. Hän lähti juoksemaan
sattumalta ja odottamatta, ja »humalaista» kirjettään hän silloin
kenties ei ollenkaan muistanut. »Sieppasi», muka, »survimen», ja te
muistatte, miten tästä yhdestä ainoasta survimesta meille kehitettiin
kokonainen psykologia, miksi hänen muka täytyi pitää tätä survinta
aseena, siepata se aseeksi y.m. y.m. Tässä nousee mieleeni eräs
hyvin tavallinen ajatus: entäpä jos tuo survin ei olisi ollut näkösällä,
ei olisi ollut hyllyllä, josta syytetty sen tempasi, vaan olisi ollut
kaapissa, — eihän se silloin olisi sattunut syytetyn silmiin ja hän olisi
lähtenyt juoksemaan ilman asetta, tyhjin käsin, eikä silloin kenties
olisi tappanutkaan ketään. Kuinka minä voin päätellä, että survin
todistaa aseella varustautumista ja ennakolta harkittua aietta? Niin,
mutta hän huuteli ravintoloissa tappavansa isänsä, mutta kaksi
päivää aikaisemmin, sinä iltana, jolloin hän kirjoitti humalaisen
kirjeensä, hän oli hiljainen ja riitaantui ravintolassa ainoastaan yhden
kauppa-apulaisen kanssa, »sillä Karamazov ei voinut olla
riitaantumatta». Mutta minä vastaan tähän, että jos hän oli jo
mielessään päättänyt sellaisen murhan, vieläpä tehnyt suunnitelman,
tuon kirjoituksen mukaisen, niin varmaankaan hän ei olisi riitaantunut
kauppa-apulaisenkaan kanssa, ehkäpä ei ollenkaan olisi mennyt
ravintolaankaan, sillä sydän, joka hautoo tämmöistä asiaa, etsii
hiljaisuutta ja näkymättömyyttä, tahtoo hävitä kokonaan näkyvistä ja
kuuluvilta: »Unohtakaa minut, jos voitte», eikä tämä johdu
ainoastaan varovaisesta harkinnasta, vaan vaistosta. Herrat
valamiehet, psykologiassa on kaksi päätä, ja mekin kykenemme
ymmärtämään psykologiaa. Mitä taasen tulee kaikkiin noihin
huuteluihin ravintoloissa koko tuon kuukauden aikana, niin vähänkö
huutelevat lapset tai juopuneet retustelijat tullessaan kapakoista ja
riidellessään keskenään: »Minä tapan sinut», eivätkä kuitenkaan
tapa. Ja tuo onneton kirjekin, — eikö sekin ole juopuneen vihastusta,
eikö se ole kapakasta ulos tulevan huuto: »Tapan, tapan teidät
kaikki!» Miksi se ei olisi niin, miksi ei olisi voinut olla niin?
Minkätähden tämä kirje on onneton, minkä tähden se ei päinvastoin
ole hullunkurinen? Juuri sen tähden, että löydettiin murhatun isän
ruumis, sen tähden, että todistaja näki syytetyn puutarhassa aseella
varustettuna pakenevan ja sai itse häneltä iskun, siis oli toimittu
kirjoitetun mukaisesti ja siksi ei kirjekään ole hullunkurinen, vaan
kohtalokas. Jumalan kiitos, me olemme päässeet pisteeseen:
»Koska oli puutarhassa, niin siis hän on tappanut.» Näillä kahdella
pikku sanalla: koska oli, niin välttämättömästi seuraa myös siis,
saamme tyhjentävästi selitetyksi kaiken, koko syytteen, — »oli,
sentähden myöskin siis». Entäpä jos ei olekaan siis, vaikka siellä
olikin? Oi, minä myönnän, että tosiasiat yhdessä, tosiasiain
yhteensattuminen, todellakin puhuvat jokseenkin kaunopuheista
kieltä. Mutta tarkastelkaapa kuitenkin kaikkia näitä tosiasioita
erikseen, antamatta niiden yhdessä lumota itseänne: miksi syyttäjä
ei mitenkään tahdo myöntää oikeaksi sitä syytetyn todistusta, että
hän juoksi pois isänsä ikkunan luota? Muistakaa niitä pistopuheita,
joita tässä syyttäjä lasketteli kunnioituksesta ja »hurskaista»
tunteista, jotka muka yhtäkkiä valtasivat murhamiehen. Entäpä jos
tässä todellakin olikin jotakin semmoista, ei kunnioituksen, vaan
hurskauden tunnetta? »Luultavasti äitini sillä hetkellä rukoili
puolestani», todistaa syytetty tutkinnassa, ja hän juoksi pois heti, kun
oli tullut vakuutetuksi, ettei rouva Svetlov ollut hänen isänsä talossa.
»Mutta hän ei voinut tulla vakuutetuksi ainoastaan katsomalla
ikkunasta», väittää syyttäjä meitä vastaan. Miksi ei voinut?
Ikkunahan avattiin, kun syyttäjä koputti merkit. Silloin saattoi Fjodor
Pavlovitš lausua jonkin sellaisen sanan tai päästää sellaisen
huudahduksen, että syytetty yht'äkkiä saattoi tulla vakuutetuksi siitä,
ettei rouva Svetlov ollut siellä. Miksi on välttämättömästi otaksuttava
asian olleen niinkuin me sen kuvittelemme, niinkuin olemme nähneet
hyväksi kuvitella? Todellisuudessa voi vilahtaa tuhansia seikkoja,
joita ei havaitse kaikkein etevinkään romaaninsepittäjä. »Niin, mutta
Grigori näki oven avoimena, siis syytetty oli varmasti sisällä ja siis
hän on tehnyt murhankin.» Tästä ovesta, herrat valamiehet…
Katsokaahan, tuosta avoimesta ovesta todistaa ainoastaan yksi
henkilö, joka kuitenkin itse oli siihen aikaan sellaisessa tilassa, että…
Mutta olkoon, olkoon että ovi oli auki, olkoonpa että syytetty on
väärin todistanut, valehdellut itsesäilytysvietin ohjaamana, mikä on
niin ymmärrettävää hänen asemassaan, olkoon, olkoon, että hän
meni sisälle taloon, oli talossa, — miksi sitten hänen
välttämättömästi täytyi tehdä murha, koska oli sisällä, hän saattoi
syöksyä sisälle, juoksennella läpi huoneitten, saattoi töytäistä isänsä
pois tieltään, saattoi kolhaistakin isäänsä, mutta tultuaan
vakuutetuksi, ettei rouva Svetlov ollut tämän luona, hän juoksi pois
iloissaan siitä, ettei lemmitty ollut siellä ja että hän oli tullut talosta
tappamatta isäänsä. Juuri tästä syystä hän kenties hyppäsikin
hetkeä myöhemmin alas aidalta kiivastuksissaan maahan
lyömäänsä Grigoria auttamaan, koska hän kykeni tuntemaan
puhdasta tunnetta, säälin ja myötätunnon tunnetta, koska hän oli
paennut kiusausta tappaa isänsä, koska hän tunsi sydämensä
puhtaaksi ja iloiseksi sen johdosta, ettei ollut tappanut isäänsä.
Kauhistuttavan kaunopuheisesti kuvaa syyttäjä meille syytetyn
hirveätä tilaa Mokrojessa, kun lempi uudelleen avautui hänelle
kutsuen häntä uuteen elämään, ja kun hän ei enää saanut rakastaa,
sillä hänen takanaan oli hänen isänsä verinen ruumis ja ruumiin
takana rangaistus. Ja kuitenkin syyttäjä piti mahdollisena rakkauden,
jonka hän myös selitti oman psykologiansa mukaan: »Hurmion tila,
muka, rikollista viedään mestattavaksi, vielä on paljon aikaa, j.n.e.,
j.n.e.» Mutta etteköhän te luonut toista henkilöä, herra syyttäjä,
kysyn taaskin. Onko, onko syytetty niin raaka ja tunnoton, että hän
saattoi vielä sillä hetkellä ajatella rakkautta ja oikeuden edessä
kiemurtelua, jos hän todellakin oli vuodattanut isänsä veren? Ei, ei ja
ei! Heti kun selvisi, että hänen lemmittynsä häntä rakastaa, kutsuu
mukaansa, lupaa hänelle uuden onnen, — oi, minä vannon, hänen
olisi täytynyt silloin tuntea kaksin verroin, kolmin verroin
voimakkaampana tarve surmata itsensä, ja hän olisi ehdottomasti
surmannut itsensä, jos hänen takanansa olisi ollut hänen isänsä
ruumis! Oi, ei, hän ei olisi unohtanut, missä pistolinsa olivat! Minä
tunnen syytetyn: julma, puiseva sydämettömyys, jonka syyttäjä
panee hänen ominaisuudekseen, ei ollenkaan ole hänen luonteensa
mukainen. Hän olisi tappanut itsensä, se on varmaa; hän ei tappanut
itseään juuri sen tähden, että »äiti rukoili hänen puolestaan» ja
hänen sydämensä oli viaton isän vereen. Hän oli murheissaan, hän
tunsi tuskaa sinä yönä Mokrojessa ainoastaan maahan lyömänsä
ukko Grigorin tähden ja rukoili sydämessään Jumalaa, että ukko
nousisi ja tulisi tajuihinsa, että hänen iskunsa ei olisi ollut kuolettava
ja että hän säästyisi sen vaatimalta rangaistukselta. Miksi ei voisi
näin selittää tapahtumia? Mikä varma todistus meillä on siitä, että
syytetty meille valehtelee? Entä isän ruumis, huomautetaan meille
heti uudestaan: hän juoksi ulos, hän ei tappanut, — kuka sitten
tappoi vanhuksen?
Minä toistan, tässä on koko syytteen logiikka: kuka sitten tappoi,
jollei hän? Ei voi, muka, panna ketään hänen sijalleen. Herrat
valamiehet, onkohan se niin? Eikö todellakaan voi panna kerrassaan
ketään? Me kuulimme, miten syyttäjä laski sormillaan kaikki sinä
yönä siinä talossa olleet ja käyneet. Tulokseksi saatiin viisi henkeä.
Kolme näistä, minä myönnän sen, on täysin vapaata
epäluulonalaisuudesta: itse murhan uhri, Grigori ja tämän vaimo.
Jäljelle jäivät siis syytetty ja Smerdjakov, ja nyt syyttäjä huudahtaa
tunteikkaasti, että syytetty viittaa Smerdjakoviin sen tähden, että hän
ei voi viitata kehenkään muuhun, ja että jos olisi olemassa joku
kuudes, vaikkapa vain jonkun kuudennen haamu, niin syytetty heti
luopuisi syyttämästä Smerdjakovia, koska moinen syytös häntä
hävettäisi, ja viittaisi tuohon kuudenteen. Mutta, herrat valamiehet,
miksi minä en voisi päätellä aivan päinvastoin? Tässä on kaksi
miestä: syytetty ja Smerdjakov, — miksi minä en sanoisi, että te
syytätte klienttiäni yksinomaan siitä syystä, ettei ole ketään muuta,
jota syyttäisitte? Ja ketään muuta ei ole sen tähden, että te
etukäteen aivan mielivaltaisesti vapautitte Smerdjakovin kaikista
epäluuloista. Niin, totta on, että Smerdjakovia vastaan todistavat
ainoastaan syytetty itse, hänen kaksi veljeänsä, rouva Svetlov eikä
kukaan muu. Mutta onhan olemassa vieläkin eräänlainen todistaja:
se on jokin, vaikkakin epäselvän, kysymyksen esiintyminen
yhteiskunnan piirissä, jonkin epäluulon, kuuluu jonkinmoinen
epäselvä huhu, tuntuu, että vallitsee jonkinlainen odotus. Lisäksi
antaa todistuksensa myöskin eräs varsin luonteenomainen, vaikka,
minä myönnän sen, epämääräinen tosiasiain rinnakkain asettelu:
ensiksikin tuo kaatuvataudin kohtaus juuri katastrofipäivänä,
kohtaus, jota syyttäjän jostakin syystä näytti olevan pakko niin
kovasti puolustella ja vakuutella. Sitten tuo Smerdjakovin äkillinen
itsemurha tuomion langettamisen edellisenä iltana. Sitten syytetyn
vanhemman veljen yhtä odottamaton todistus tänään oikeudessa,
vaikka hän tähän saakka oli uskonut veljensä olevan syyllisen, sekä
se, että hän yhtäkkiä toi rahat ja julistaa hänkin vuorostaan
Smerdjakovin murhaajaksi! Oi, minä olen täydelleen vakuutettu
niinkuin oikeuskin ja prokuraattori, että Ivan Karamazov on sairas ja
kuumeessa, että hänen todistuksensa tosiaankin saattoi olla
epätoivoinen yritys, sen lisäksi kuumehoureissa keksitty, pelastaa
veli syyttämällä vainajaa. Mutta joka tapauksessa sentään mainittiin
Smerdjakovin nimi, ja taaskin tuntuu siinä olevan jotakin
arvoituksellista. Jotakin tässä, herrat valamiehet, on ikäänkuin jäänyt
loppuun puhumatta ja loppuun viemättä. Ja ehkäpä se vielä tulee
loppuun puhutuksi. Mutta jättäkäämme toistaiseksi tämä, siitä tulee
edempänä puhe. Oikeus päätti äsken jatkaa jutun käsittelyä, mutta
nyt, sitä odoteltaessa, minä voisin kuitenkin jotakin huomauttaa
esimerkiksi Smerdjakov-vainajan luonteenkuvauksesta, jonka
syyttäjä suoritti niin tarkkasilmäisesti ja niin kyvykkäästi. Vaikka
ihmettelen kykyä, en kuitenkaan voi myöntää karakteristiikkaa asian
olemukseen nähden täysin oikeaan osuneeksi. Minä olen ollut
Smerdjakovin luona, olen nähnyt hänet ja puhunut hänen kassaan,
ja hän teki minuun aivan toisenlaisen vaikutuksen. Hänellä oli heikko
terveys, se on totta, mutta luonteeltaan, mutta sydämeltään, — ei,
hän ei ollut ollenkaan niin heikko mies kuin syyttäjä on hänestä
päätellyt. Varsinkaan minä en löytänyt hänestä arkuutta, sitä
arkuutta, jota syyttäjä meille niin kuvaavasti esitteli. Suoruutta taas
hänessä ei ollut ensinkään, huomasin päinvastoin hirveätä
epäluuloisuutta, joka kätkeytyi naiivisuuden suojaan, ja hänellä oli
äly, joka kykeni oivaltamaan sangen monia asioita. Oi, syyttäjä on
liian vähästä ruvennut pitämään häntä matalajärkisenä. Minuun hän
teki sangen täsmällisesti määriteltävän vaikutuksen: lähdin hänen
luotaan vakuutettuna siitä, että hän oli ehdottomasti ilkeä olento,
määrättömän kunnianhimoinen, kostonhaluinen ja tuiki kateellinen.
Olen koonnut erinäisiä tietoja hänestä: hän vihasi syntyperäänsä,
häpesi sitä ja muisteli hampaitaan kiristellen, että »oli saanut alkunsa
Smerdjaštšajasta». Palvelija Grigoria ja tämän vaimoa kohtaan, jotka
hänen lapsuudessaan olivat olleet hänen hyväntekijöitään, hän oli
epäkunnioittava. Venäjää hän kirosi ja pilkkasi. Hän haaveili
Ranskaan muuttamista ja muuttumista siellä ranskalaiseksi. Hän oli
jo aikaisemmin puhunut paljon ja usein siitä, että hänellä ei ole
varoja tähän. Minusta näyttää, ettei hän rakastanut ketään paitsi
itseään, mutta itseään kohtaan hän tunsi ihmeellisen korkeata
kunnioitusta. Sivistys oli hänen mielestään hyvät vaatteet, puhtaat
paidanrinnukset ja kiilloitetut saappaat. Pitäen itseään (siihenkin on
todistuksia) Fjodor Pavlovitšin aviottomana poikana hän saattoi
tuntea vihaa, kun hän vertasi asemaansa herransa aviolasten
asemaan: heillä, muka, on kaikki eikä hänellä mitään, heillä on kaikki
oikeudet ja he saavat periä, mutta hän on vain kokki. Hän kertoi
minulle, että hän oli itse yhdessä Fjodor Pavlovitšin kanssa
laittamassa noita rahoja kääröön. Tarkoitus, johon tuo rahasumma oli
määrätty, — summa, jolla hän olisi voinut luoda onnensa, — oli
hänelle tietysti hyvin vastenmielinen. Sitäpaitsi hän näki
kolmetuhatta ruplaa, kirkkaita sadan ruplan seteleitä (minä kysyin
häneltä vartavasten tätä). Oi, älkää näyttäkö koskaan kateelliselle ja
itserakkaalle ihmiselle yhdellä kertaa suurta rahamäärää, mutta hän
näki nyt ensimmäisen kerran niin paljon rahaa samoissa käsissä.
Sataruplasten pinkka saattoi jättää hänen mieleensä kirvelevän
kuvan, joka ensimmäisellä kerralla ei johtanut mihinkään
seurauksiin. Suurikykyinen syyttäjä esitti meille tavattoman
hienovivahteisesti kaiken, mitä voi tuoda esille pro ja contra siihen
otaksumaan nähden, että Smerdjakovia voisi syyttää murhasta, ja
hän kysyi erityisesti: minkä tähden tämän tarvitsi teeskennellä

You might also like