15,381 reputation
13088
bio website quantdec.com
location Northeastern US
age 14
visits member for 2 years, 11 months
seen yesterday

Consultant (environmental and spatial stats a specialty), expert witness, and teacher. I can be reached through (outdated but still valid) links posted on my web site.

Twitter: @WilliamAHuber // ASA-P website: http://amstatphilly.org/


Why waste time learning, when ignorance is instantaneous?

--T(iger) Hobbes.

For any complex problem there is a simple solution. And it's always wrong.

--[Mis?]attributed to H.L. Mencken by Dava Sobel, Longitude.


May
18
reviewed Leave Open Doing vector manipulations on Mathematica
May
18
comment Using single replacement rule to convert algebraic expression
You might find Alternatives to be useful.
May
17
comment Solving an ODE in power series
+1 This is a good start. Power series solutions, though, are frequently used to obtain recursion equations for the coefficients (of any solution that might be analytic within a neighborhood of the point of expansion). It would be nice, then, to have a function that outputs these equations (given a differential operator as input), rather than just obtaining an approximate solution with a limited radius of accuracy. In order to analyze singular points, it would also be useful to consider slightly more general series of the form $z^\alpha(a_0+a_1z+a_2z^2+\cdots)$ for non-integral $\alpha$.
May
16
reviewed Close How to tell Mathematica to make assumptions?
May
16
reviewed Leave Open Using ImageTransformation[] with a lookup table
May
16
reviewed Close List of Tribonacci Polynomials with Mathematica?
May
15
comment Integration of a rational function
Alternatively, use the Residue Theorem. Implicitly assuming $b\gt 0$ (WLG) and $c\gt 0$, we may (very quickly) obtain the solution as 2 \[Pi] I Sum[Residue[(a + x)/((b^2 + (a + x)^2) (1 + c (a - x)^2)), {x, z}], {z, {b I - a, I/Sqrt[c] + a}}] // Simplify, yielding $\frac{2 a \sqrt{c} \pi }{1+2 b \sqrt{c}+4 a^2 c+b^2 c}$.
May
15
revised How to deal with zero in NDSolve in mathematica?
added 94 characters in body
May
15
comment How to deal with zero in NDSolve in mathematica?
That completely changes the question!
May
15
comment How to deal with zero in NDSolve in mathematica?
+1 This argument can be made rigorous by considering the approximate differential equation as a perturbation of the original. Applying DSolve with initial conditions is not very persuasive. It's more insightful to omit initial conditions: the solution will include a Bessel function of the second kind. This captures the singular behavior at the origin and approximates the singular behavior of the original equation there, too. Standard theory shows that's all the solutions you can have--just two dimensions of them--and then the rest of the analysis goes through as shown here.
May
14
comment How to deal with zero in NDSolve in mathematica?
The equations are inconsistent with the initial conditions. At $t=0$ you are requiring that $0 = t y'(t) = -x(t) - t \exp(x(t)) = -1$ which is impossible.
May
14
reviewed Reviewed Variable naming changes everything
May
14
reviewed Leave Open How to store a SparseArray?
May
14
awarded  Enlightened
May
14
awarded  Nice Answer
May
11
awarded  Good Answer
May
10
comment How do I draw a hemisphere?
+1 -- but it's a little bit harder to use this technique to draw an arbitrary hemisphere. :-)
May
10
comment How do I draw a hemisphere?
One method (using RegionFunction) is shown here.
May
10
comment Can one identify the design patterns of Mathematica?
@Oleksandr Those are excellent points. Transforming a held expression is an idiomatic form of self-modification. I think it would be fair to subject such code to the same criticisms applied to all self-modifying code. Memoization, though, still seems to fall a little short of self-modification, because it is really just caching values. The relevant code itself is unchanged, although arguably the memoized object itself undergoes a (benign, controlled) form of "modification" in the sense of augmenting its collection of downvalues at runtime.
May
10
comment Can one identify the design patterns of Mathematica?
Not knowing what operation will take place is similar to not knowing (at compile time) what values the parameters will have, either. "Self-modifying" does not mean "unknown at compile time." Your example would be implemented in Assembly or C or their ilk using a dispatch table. Although the exact procedure will not be known until runtime, there is control over which procedures can be executed and in particular any procedure that might get executed has already been created before the execution started. During runtime, no code is actually modified.