Errata

Mathematica Cookbook

Errata for Mathematica Cookbook

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date Submitted
Printed, PDF, ePub, Mobi, , Other Digital Version Page throughout
text

throughout the title there are some expired URLs -- about 50% of the URLs in the print and digital editions no longer work.

Anonymous  Jun 16, 2022 
Printed Page 445
First Paragraph

"A standard result from electrostatics is that the net flux out of a unit sphere, for a field that is everywhere normal, is zero."

The field F2 given in the example isn't normal to the f2 sphere: It is a unidirectional field pointing in the direction {1,1,1} and has the same strength on all points on the unit sphere (norm of 1, and only there). The Integral is zero, but not for the stated reason: It is rather a coincidence of this non-uniform field that it has the same strength and direction on all points on the sphere and the flux piercing into the sphere is the same as the flux piercing its way out.

What was intended was probably the Flux of a central field F2 of the form:

F2:={x,y,z}/(x^2+y^2+z^22)^3/2

Which gives the Integral -4 Pi. This is Gauss' Law, and a standard result of electrostatics.

The result is of the wrong sign because the Surface Elements of the Integral over the sphere are parametrized in such a way that they are pointing INTO the sphere, not out of it.

Sebastian Henckel  Jan 29, 2015 
PDF Page 509
body of function makePeriodicTable

Table[makeElem[a, gsz], makeElemDetail[a], {a, re3, re4}...

should be

Table[Tooltip[makeElem[a, gsz], makeElemDetail[a]], {a, re3, re4}...

Without the Tooltip wrapper, tooltips don't work for the bottom (Actinide series) row of the periodic table

Anonymous  May 03, 2014 
PDF Page 336
Solution text 2nd paragraph

The two variable names referenced in the solution text - inside parentheses - do not match the variables names in the code sample, they are reversed.

In the solution text they are named: rgbMin, rgbMax

In the code: minRGB, maxRGB

Danny Nodal  Jan 19, 2014 
PDF Page xvii
India

Should be Matlab instead of Mathlab -

However,
this style is often mysterious to people who come to Mathematica from other
languages like Fortran, C, Mathlab, or Microsoft Excel. I think this chapter will help
you discover the rewards of the functional style.

Anonymous  Aug 17, 2013 
PDF Page 30
6th paragraph

The link provide for "An excellent animated introduction to core Mathematica functions" as "http://bit.ly/3cuB4B" is broken.
Also the same problem with the link provided for "Why Functional Pro-
gramming Matters by John Hughes" as "(http://bit.ly/4mRBYO".

Amir Ekrami  Apr 28, 2013 
Other Digital Version 608
608, In[29 ]

See LHR11 Oct 29, 2012 errata for expression In[29], Ohm's law.
In the second paragraph of that errata, the text,
". . . the first half residing on page 609 into one cell and the second half residing on page 610 into the following Mathematica cell.. . "
should read,
". . . the first half residing on page 608 into one cell and the second half residing on page 609 into the following Mathematica cell. . . . "

Also note that the unzipped notebook ora.nb must reside in the same directory as the unzipped Chapter 15 notebook 15Interactivity.nb. If ora.nb is not so present, Mathematica 8 will not properly open notebook 15interactivity.nb. For example, numbered subheadings will all appear improperly as 15.0, instead of 15.0, 15.1, 15.2, . . . seriatim.

The hint in the Oct 29,2012 errata that a second recipe in Chapter 15 fails to evaluate to an executable result explicitly refers to In[69] on page 629. What is the reason? Anyone?

Lewis Robinson  Oct 31, 2012 
Other Digital Version 608
End of In[29] at bottom of page 608

Using Firefox, I downloaded the Mathematica version of Mathematica Cookbook as a ZIP file. It got automatically stored in Firefox's Download folder. I unzipped the downloaded file to get a chapter-by-chapter listing, with all chapter names corresponding to the print version and displayed as .nb files. I clicked 15Interactivity.nb to open chapter 15 as a notebook in Mathematica 8, enabled the Dynamics button, pulled down Evaluation on the menu bar, clicked Evaluate Notebook, (took maybe 10-20 seconds). and scrolled through entire result, looking for example recipes in the chapter that failed to produce an executable result. Two such were discovered, the most important in my view being In[29] on page 608, which is under subheading 15.5 "Intercepting the Values of a Control Attached to a Dynamic Expression", page 607

A variety of unhelpful error messages were examined to no avail. Closer examination of the recipe did, however reveal a simple structural fault in the displayed listing of recipe In[29 ]. It had somehow been split in two, the first half residing on page 609 into one cell and the second half residing on page 610 into the following Mathematica cell. The fix was simple. I just merged the two cells to get a clean executable, no strange compile errors. What other recipe failed? Here is a hint. It is one under subheading 15.15, page 629, no simple fix apparent.

Lewis Robinson  Oct 29, 2012 
Printed, PDF Page 152
4th paragraph, line 2

"Orderless means the operation is communicative"

I think you meant to write "commutative" instead of "communicative".

Michael Wijaya  Jun 27, 2012 
Printed Page 57
2nd paragraph

In[155] contains a module with "fact" as a local variable.
Wouldn't it be better to just use:

factorialListSow[n_]:=Sow[n * factorialListSow[n-1]]

Am I missing something?

Ruben Garcia Berasategui  Jun 14, 2012 
Printed Page 67
4th paragraph

the argument in read for In[219] should be empty: read[ ] instead of read[7]

Ruben Garcia Berasategui  Jun 14, 2012 
PDF, Other Digital Version Page iv
first paragraph

The code provided for the Mathematica 30-day trial doesn't work, for me. I've tried adding an extra 5 as suggested by the print errata, but that also doesn't work. I assume that had been corrected in the ebook version, anyway.

Not sure what to do next. I'm planning on contacting Wofram support to see if they can help.

ottohammersmith  Apr 10, 2012 
Printed Page 111
above 3 matrix

Hi.. I just think that instead of use

Do[AppendTo[x[[i]],9],{i,1,6}]
It is much more elegant (functional) to use

x=#~Append~9&/@x
or
x=Append[#,9]&/@x

just a suggestions
Tks

Rodrigo Murta  Apr 02, 2012 
Printed Page 610
1st text paragraph

This paragraph introduces and should explain the use of the TrackSymbols option of Dynamic. It should not mention Refresh which does not appear in In[32].

Morton Goldberg  Oct 16, 2011 
Printed Page 579
Middle

The grid points for the stock price should be placed in a range not too
tight around the current stock price. In this example, the range is
chosen from zero up to twice the strike price. From the chosen region
results the step size ΔS for the discretization of the stock prices
range. One way to generate the list of grid points is to use NestList.
#+ΔS& within NestList is a generic function defined for local use. ==>
NestList+ΔS&..

Nellie McKesson
Nellie McKesson
 
May 24, 2011 
Printed Page 383
First paragraph

There's a very unsatisfying feature to the result: the chords jump
around in an unmusical way. A piano player would typically invert the
chords to keep the voicings centered around middle C. So for example,
when playing a CMaj7 chord, which is
defined as {0,4,7,11} or {"C3","E3","G3","B3"}, a piano player might
drop the top two notes down an octave and play {-5,-1,0,4} or
{"G2","B2","C3","E3"}. You can use Mathematica's Mod function to achieve
the same result. Here the notes greater than 6 {"F#3"} are transposed
down an octave simply by subtracting 12 from them.
==> each should be {0,4,-5,-1} and {"C3", "E3","G2","B2"} ?

Nellie McKesson
Nellie McKesson
 
May 24, 2011