Full Scientific Computing With MATLAB Second Edition Dingyu Xue Ebook All Chapters
Full Scientific Computing With MATLAB Second Edition Dingyu Xue Ebook All Chapters
Full Scientific Computing With MATLAB Second Edition Dingyu Xue Ebook All Chapters
com
DOWLOAD HERE
https://textbookfull.com/product/scientific-
computing-with-matlab-second-edition-dingyu-xue/
DOWLOAD NOW
https://textbookfull.com/product/differential-equation-solutions-
with-matlab-fundamentals-and-numerical-implementations-de-
gruyter-stem-dingyu-xue/
https://textbookfull.com/product/calculus-problem-solutions-with-
matlab-1st-edition-dingyu-xue/
https://textbookfull.com/product/linear-algebra-and-matrix-
computations-with-matlab-1st-edition-dingyu-xue/
https://textbookfull.com/product/matlab-programming-mathematical-
problem-solutions-de-gruyter-stem-1st-edition-dingyu-xue/
Solving applied mathematical problems with MATLAB
Second Edition Chen
https://textbookfull.com/product/solving-applied-mathematical-
problems-with-matlab-second-edition-chen/
https://textbookfull.com/product/learning-scipy-for-numerical-
and-scientific-computing-second-edition-sergio-j-rojas-g/
https://textbookfull.com/product/planar-multibody-dynamics-
formulation-programming-with-matlab-and-applications-second-
edition-nikravesh/
https://textbookfull.com/product/matlab-parallel-computing-
toolbox-user-s-guide-the-mathworks/
https://textbookfull.com/product/scientific-computing-an-
introductory-survey-2nd-edition-heath-m-t/
Scientific Computing
with MATLAB®
Second Edition
Scientific Computing
with MATLAB®
Second Edition
Dingyü Xue
Northeastern University
Shenyang, China
YangQuan Chen
University of California
Merced, USA
MATLAB® is a trademark of The MathWorks, Inc. and is 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® software or related products
does not constitute endorsement or sponsorship by The MathWorks of a particular pedagogical approach or particular
use of the MATLAB® software.
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
© 2016 by Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business
This book contains information obtained from authentic and highly regarded sources. Reasonable efforts have been
made to publish reliable data and information, but the author and publisher cannot assume responsibility for the valid-
ity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright
holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this
form has not been obtained. If any copyright material has not been acknowledged please write and let us know so we may
rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or uti-
lized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopy-
ing, microfilming, and recording, or in any information storage or retrieval system, without written permission from the
publishers.
For permission to photocopy or use material electronically from this work, please access www.copyright.com (http://
www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923,
978-750-8400. CCC is a not-for-profit organization that provides licenses and registration for a variety of users. For
organizations that have been granted a photocopy license by the CCC, a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used only for
identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
Contents
Preface xiii
v
vi Contents
3 Calculus Problems 61
Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
7.1 Analytical Solution Methods for Some Ordinary Differential Equations . . 306
7.1.1 Linear time-invariant ordinary differential equations . . . . . . . . . 306
7.1.2 Analytical solution with MATLAB . . . . . . . . . . . . . . . . . . . 307
7.1.3 Analytical solutions of linear state space equations . . . . . . . . . . 310
7.1.4 Analytical solutions to special nonlinear differential equations . . . . 311
7.2 Numerical Solutions to Ordinary Differential Equations . . . . . . . . . . . 312
7.2.1 Overview of numerical solution algorithms . . . . . . . . . . . . . . . 312
7.2.2 Fixed-step Runge–Kutta algorithm and its MATLAB implementation 314
x Contents
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
Since the first edition of this book published in 2008, computing landscape changed radically,
from cloud computing to big data science, from wearable computing to internet of things,
from deep learning to driverless cars... yet in more general sense, computing happens in all
walks of life, from falling rocks to withering leaves, from climate change to extreme weather,
from gene editing to digital matter... But one thing not changed is the scientific computing
fundamentals that cover all college mathematics. Busy students, engineers and scientists
need “fast-food” ways to compute and get problems solved reliably.
Oliver Heaviside once said “Mathematics is of two kinds, Rigorous and Physical. The
former is Narrow: the latter Bold and Broad. To have to stop to formulate rigorous
demonstrations would put a stop to most physico-mathematical inquiries. Am I to refuse
to eat because I do not fully understand the mechanism of digestion?”1 Today, we can
ask a similar question: Am I to refuse to compute because I do not fully understand the
mechanism of numerics? As we discussed in the Preface of the first edition, we need a new
way of learning scientific computing so that we can focus more on “computational thinking.”
With these goals in mind, this edition includes the following new features:
(1) A significant amount of new material is introduced, specifically: four-dimensional
volume visualization, interval limit, infinite series convergence, numerical multiple integral,
arbitrary matrix analysis, matrix power, difference equations, numerical integral trans-
forms, Laurent series, matrix equation solutions, multi-objective optimizations, dynamic
programming and shortest path problems, matrix differential equations, switching ODEs,
delay ODEs, special functions, principal component analysis, Monte Carlo algorithm, outlier
detection, radial basis network, particle swarm optimization, and a completely new section
on fractional calculus.
(2) The three-phase solution procedure proposed by the authors has been followed
throughout the book. Namely, to solve a problem, the physical explanation of the
mathematical problem to be solved is given first, followed by the methodology of how
to formulate the problem in MATLAB -compatible framework, and finally, the third phase
is to call MATLAB functions to solve the problem. The guideline is useful in real world
problem solving with lots of illustrative examples.
(3) Mathematical branches are arranged more systematically. Using the traditional styles
in mathematical presentation (as in typical mathematics courses), however, concentrations
are made on how the problems are solved. If there are existing MATLAB functions, or third-
party products, suggestions are made to use them directly. If there are not, or if existing
ones are problematic, new MATLAB functions are written and easy-to-use calling syntaxes
are designed and explained.
(4) Soon after the publication of the first edition, MATLAB R2008b was released,
from which the symbolic engine is replaced, and some of the commands, especially those
1 Edge A. Oliver Heaviside (1850–1927) - Physical mathematician. Teaching Mathematics and Its
xiii
xiv Preface
involving overload functions and Maple internal functions, cannot be used for the symbolic
computation problems. In the new edition, compatibility with the new versions of MATLAB
are supported.
(5) Enhanced examples and exercises are included to support the materials throughout
the new edition. A complete set of teaching materials, composed of about 1500 PPT slides
and a solutions manual, is provided with the book. The relevant materials can be downloaded
from the authors-maintained web-site at
https://mechatronics.ucmerced.edu/Scientific-Computing-with-MATLAB-2ndEd
Financial support from the National Natural Science Foundation of China under Grant
61174145 is acknowledged. Thanks also go to Drs. Yanliang Zhang and Lynn Crisanti
for arranging the first author’s visit to MathWorks, Natick, MA for discussing a possible
MOOC project for the book. A MOOC in Chinese is just made ready and will be released
soon, thanks to the support from Liaoning Provincial Education Bureau and Northeastern
University, China. Classroom videos in English are scheduled. New information and links
on the MOOC progress will be anounced in the above web-site.
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. For product
information, please contact:
The MathWorks, Inc.
3 Apple Hill Drive
Natick, MA, 01760-2098, USA
Tel: 508-647-7000
Fax: 508-647-7101
E-mail: info@mathworks.com
Web: http://www.mathworks.com
This new edition was suggested and supported by Sunil Nair, Publisher, CRC Press,
Taylor and Francis Group. We are thankful for Sunil’s patience and constructive comments.
We wish to specially thank Michael Davidson, Project Editor, Taylor and Francis Group,
LLC for helping us with an excellent copy-editing service. We would like to extend our
appreciation to Professor Jian-Qiao Sun of University of California, Merced for adopting the
first edition of the book for his ME021 “Engineering Computing” course and for motivating
a new edition with a bigger format size. The new materials of the book have been used in
a course entitled “MATLAB and Scientific Computing” for two semesters in Northeastern
University, China. All the students of Lang Shijun Automation Experimental Classes 1309
and 1410, especially Mr. Weiming Mi and Mr. Huaijia Lin, are acknowledged for some new
insights and the hard work of modifications of the PPT slides and solutions manual.
Last but not least, Dingyü Xue would like to thank his wife Jun Yang and his daughter
Yang Xue; YangQuan Chen would like to thank his wife Huifang Dou and his sons Duyun,
David and Daniel, for their patience, understanding and complete support throughout this
book project.
xv
xvi Preface of the First Edition
published in 2004. Many researchers, professors and students have provided useful feedback
comments and input for the newly extended English version. In particular, we thank the
following professors: Xinhe Xu, Fuli Wang of Northeastern University; Hengjun Zhu of
Beijing Jiaotong University; Igor Podlubny of Technical University of Kosice, Slovakia;
Shuzhi Sam Ge of National University of Singapore, Wen Chen of Hohai University, China.
The writing of some parts of this book has been helped by Drs. Feng Pan, Daoxiang Gao,
Chunna Zhao and Dali Chen, and some of the materials are motivated by the talks with
colleagues at Northeastern University, especially Drs. Xuefeng Zhang and Haibin Shi. The
computer aided instruction kit and solution manual were developed by our graduate students
Wenbin Dong, Jun Peng, Yingying Liu, Dazhi E, Lingmin Zhang and Ying Luo.
Moreover, we are grateful to the Editors, LiMing Leong and Marsha Hecht, CRC
Press, Taylor & Francis Group, for their creative suggestions and professional help. The
“Book Program” from The MathWorks Inc., in particular, Hong Yang, MathWorks, Beijing,
Courtney Esposito, Meg Vuliez and Dee Savageau, are acknowledged for the latest MATLAB
software and technical problem support.
The authors are grateful to the following free toolbox authors, to allow the inclusion of
their contributions in the companion CD:
Dr. Brian K Birge, for particle swarm optimization toolbox (PSOt)
John D’Errico, for fminsearchbnd Toolbox
Mr. Koert Kuipers for his BNB Toolbox
Dr. Johan Löfberg, University of Linköping, Sweden for YALMIP
Mr. Xuefeng Zhang, Northeastern University, China for RSDA Toolbox
Last but not least, Dingyü Xue would like to thank his wife Jun Yang and his daughter
Yang Xue; YangQuan Chen would like to thank his wife Huifang Dou and his sons Duyun,
David and Daniel, for their patience, understanding and complete support throughout this
work.
Dingyü Xue
Northeastern University
Shenyang, China
xuedingyu@mail.neu.edu.cn
YangQuan Chen
Utah State University
Logan, Utah, USA
yqchen@ieee.org
Another random document with
no related content on Scribd:
The Race.
Here are two boys running a race. They seem to be striving to see
which can run the swiftest; which can outstrip the other.
It is pleasant to run a race, if one is young and has a good pair of
legs. I should make a bad business of it,—old and decrepit as I am,
—and having a timber toe beside. Still, I can well recollect how I
used to delight in trying my speed with my youthful companions,
when I was a boy.
I remember very well, that, when I was young, there was a boy
at school by the name of Rufus, and it chanced that he and myself
were rivals in almost everything. We were always striving to see
which should run the swiftest; which should hop the farthest; which
should excel in writing, arithmetic, &c.
Now all this was very well, except one thing. Our rivalry at last
went so far, that we desired victory more than anything else. We did
not wish so much to do things well, as to triumph over our
competitors. Nor was this all: we began at length to dislike each
other, and a very bad feeling was therefore begotten by our strife, in
our bosoms.
This was certainly wrong, and young people as well as old people
should be careful never to indulge in any strife which leads to
hatred. We should love all around us, for love is the chief source of
happiness. Anything which interferes with this is wrong.
The Swing.
Here are children indulging themselves in swinging. ’Tis a very
pleasant amusement, and is as near to flying as anything we can do.
What a thrill passes through the heart, half pleasant and half painful,
when we go up, up, up—and then down, down, down!
In the western country, the children do not have to make swings
of ropes, for they are provided by nature. The grape vines climb up
the trees, often to the height of twenty feet, and then afford good
swings for the children. If you ever visit Kentucky, or Ohio, or
Missouri, or any of those great states in the west, you will probably
see children amusing themselves in grape vine swings.
A Strange Bird.
Not long since, a man in Connecticut shot an eagle of the largest
kind. The creature fell to the ground, and being only wounded, the
man carried him home, alive.
He now gave him to another man, who took good care of the
wounded bird, and pretty soon he got quite well. The eagle became
attached to the place where he was thus taken care of, and though
he was permitted to go at large, and often flew away to a
considerable distance, he would always come back again.
He used to take his station in the door-yard, in front of the house:
if any well-dressed person came through this yard, to the house, the
eagle would sit still and make no objections; but if a ragged person
came into the yard, he would fly at him, seize his clothes with one
claw, and hold on to the grass with the other, and thus make him a
prisoner.
Often was the proprietor of the house called upon to release
persons that had been thus seized by the eagle. It is a curious fact
that the bird never attacked ragged people going to the house the
back way: it was only when they attempted to enter through the
front door, that he assailed them. What renders this story very
curious is, that the bird had never been trained to act in this manner.
This eagle had some other curious habits. He did not go out every
day to get a breakfast, dinner and supper: his custom was, about
once a week, to make a hearty meal, and that was sufficient for six
days. His most common food was the king-bird, of which he would
sometimes catch ten in the course of a few hours—and these would
suffice for his weekly repast.
This bird at last made such havoc with the poultry of the
neighbors, that the proprietor was obliged to kill him.
It seems that the aversion of this eagle to ragged people, was not
altogether singular; for a person who writes to the editor of the New
York American, says that he once knew a Baltimore Oriole, that
would always manifest the greatest anger if a shabby person came
into the room. This bird also disliked colored people, and if he could
get at them, he would fly in their faces, and peck at them very
spitefully—while he did no such thing to white people.
The following letter has been some time in hand. Will our little
friend, the writer, forgive us for not inserting it sooner? Our
correspondents must remember that we have many things to attend
to, and if some of their favors seem to be overlooked, we hope they
will not scold.
My dear Mr. Merry:
I have been long wanting to write to you, so many of your
subscribers have been writing to you. I could not write to you
sooner, because I did not know my letter would go by the
mail.
Many of the stories in the Museum are quite interesting. I
have often tried to read your history of your own life,
through. I should have begun when your Museum first came
out, but it happened that I did not. “Philip Brusque” I began
too, but, as my brother was going up the river in a
steamboat, he wanted to take the number, so that I had to
leave off reading it.
In your number before the last I liked the “Two Friends.”
Many of the children like “The Siberian Sable-hunter,” but I do
not fancy it much, as there are so many hard names in it.
I am one of your little black-eyed subscribers: my brother
Benjamin is one of your blue-eyed subscribers. He does not
read as many of your Museums as I do, for he is away from
home a great part of the time, and when he gets home he
hardly ever thinks of reading them. I am always glad when I
hear that your Museum is come, and yet, the last time, they
kept it from me for a day and a night. Was not that very
hard?
My little sister, Lydia, is yet too young to read, and does
not even know her A, B, C; but I know them well enough. I
like your plain, simple stories best. I believe my brother likes
the ones that are not simple. In your number, a great while
ago, is a song by the name of “Jack Frost,” which I like very
much, and many other pieces of your poetry. “Discontented
Betty” I like too. I have been hurrying off with my lessons, so
that I could write to you; but, pray, do not think that I write
this myself, for I do not even know how to make a letter. My
sister writes for me.
I am in constant fear that we shall have to give up your
Museum, but I hope we shall not. I thought that I would have
to send my letter by the man that brought the Museum, but
my father told me that I need not, but that I should send it
by the mail. I hope your Museum will not end very soon, but
will keep on a long while. I have found out three of your
names, Parley, Merry and Goodrich. I want to see you very
much. My sister Mary is collecting autographs, and has got
one of yours, which I think to be quite a decent hand for such
an old man. I hope this letter will reach you safely. I wonder
if the one my brother William wrote to you, a long time ago,
ever reached you.
I have read some of your other books, as we have got
some others. I consider myself a very poor reader, if others
do not. I had a beautiful book given to me on New Year’s day,
by the name of “Flower People.” But I cannot think of
anything more to say, and so, Mr. Merry, good-bye.
E. O. B.
P.S. I have thought of one other thing to say, Mr. Merry,
and it is that I wish you would answer this letter.
MERRY’S MUSEUM.
September.
We have now reached the ninth month in the year—the first
month of autumn—September—the pleasantest month of all the
twelve. It is true the leaves of the trees are beginning to turn yellow;
many of the birds are departing for more southern climes; the
evenings are getting chilly; the summer flowers are gone; and all
around there is an air of soberness, almost of sadness. Yet there is
something in all this, that makes the heart content, tranquil and
happy.
The earth is now abounding with fruit. The peaches, the plums,
the pears, the apples, the grapes, are ripe, and seem to invite us to
taste them. How pleasant it is to be in the country now! Say, my
little friends, is not September the finest of all the months?
Jumping Rabbit’s Story.
chapter iii.
john baker.
This man was wonderful for the power he had over the muscles of
his face. Though he had not a long nose, yet he could move it in
such a manner as to take a piece of money up from a table between
his nose and chin, and hold it there firmly. Nay more, he could draw
his nose down in such a manner as to take it into his mouth, and
then his under lip appeared even with his eyes and forehead! He
could also put the stem of a tobacco pipe through his nose, and then
take up a wine glass and hold it between his nose and chin, as
shown in the portrait.
The performances of this man astonished all who saw him, and
several eminent medical men expressed great wonder at his feats.
He was both a sailor and a soldier, in the British service, and served
in the revolutionary war, in America. He was twice married, and had
a family of thirteen children. His life was one of great vicissitude,
and when an old man, he was famous at Wapping, for his stories
about what he had seen and done. He had a good opinion of
himself, and used generally to wind off his long tales with the
declaration that his equal was not to be found in the whole world!