2,914 reputation
1611
bio website stephenluttrell.com
location West Malvern, United Kingdom
age
visits member for 2 years, 6 months
seen 1 hour ago

I have been a Mathematica user since 1981, using version 0 to do QCD calculations for my PhD, and all subsequent versions to do research into various sorts of adaptive information processing. The use of Mathematica has been the key to almost every new result that I have discovered, because I can do "experiments" at the speed at which I think (more or less), so I don't get bored or lose my train of thought. Mathematica and I are a well-matched symbiotic pair!


Dec
16
comment Solving a set of equations
You can solve this one using NonlinearModelFit.
Dec
9
comment Piecewise functions Integration with symbol
You can simplify the output by feeding it to FullSimplify.
Dec
6
comment How can I trans-compile Mathematica into another language?
Perhaps something like "MathCode C++" and/or "MathCode F90" would do what you want. These are advertised as "Generates Optimized C++/F90 Code from Mathematica Programs".
Dec
4
comment How to package a function for export?
Maybe FullDefinition does what you want, assuming you capture its printed output and then export it appropriately — e.g. for a symbol f and its dependencies use FullDefinition[f] // ExportString[#,"Text"]&.
Nov
20
comment Simplify returns wrong result
You could try /.{x->x0+eps}//Simplify then /.{eps->0}.
Nov
19
comment Strange wiggles on the surface of a ParametricPlot3D
It may be an anti-aliasing problem. Have you tried Mathematica / Preferences / Appearance / Graphics and move the slider over to "Highest Quality"?
Nov
2
comment StreamPlot in a system x´ = f[x] + g[t]
Maybe this is the sort of thing you want: Manipulate[StreamPlot[{2 x - 3 y + 3 t, 5 x + y - t}, {x, -3, 3}, {y, -3, 3}], {{t, 0, "t"}, -5, 5}],
Nov
2
answered How to export 3D graphics to Collada (.dae) format?
Oct
29
comment Hilbert transform of density of states
When there are poles and branch points you have to be careful. You can get a better idea of what Mathematica is doing if you plot the indefinite integral in the complex plane. Define indefint[x_, z_] = Integrate[Sqrt[4 - x^2]/(z - x), x] // FullSimplify, and then play around with With[{z = 1 + 2 I, a = 5}, Show[ContourPlot[Re@indefint[x + I y, z], {x, -a, a}, {y, -a, a}, Epilog -> {PointSize[0.02], Red, Point[{Re[z], Im[z]}]}], ContourPlot[Im@indefint[x + I y, z], {x, -a, a}, {y, -a, a}, ContourShading -> None]]] or some variant of this, and then choose your x1 and x2 appropriately.
Oct
29
comment High-Precision NSolve
You can solve this one symbolically using Solve[f1[x] == f2[x], x], which gives the output {{x -> -2 ProductLog[-((e^2 k \[Alpha] Sqrt[(Zl \[Rho])/(e^2 k \[Alpha])])/(2 Zl \[Rho]))]}, {x -> -2 ProductLog[(e^2 k \[Alpha] Sqrt[(Zl \[Rho])/(e^2 k \[Alpha])])/(2 Zl \[Rho])]}}, though there is also a warning message "Inverse functions are being used ...".
Oct
25
comment Problem in finding the numerical maximum
NSolve[Simplify[i'[s]] == 0 && 0 <= s <= 2 \[Pi], s] finds all of the stationary points, which you could then develop into a full solution to your problem.
Oct
22
comment Strange integration
BTW, I like your use of the 1/(1-z) == Sum[z^k, {k, 0, \[Infinity]}] trick.
Oct
22
comment Strange integration
Based on a ListPlot of the terms in my Sum I had assumed that there must be subtle tricks going on behind the scenes in V10 in order for it to get its result to come out - in fact, I was rather surprised that it worked at all.
Oct
22
answered Strange integration
Oct
15
comment Integrate yields complex value, while after variable transformation the result is real. Bug?
I tried to drill down to the origin of this bug. Define the integrand f[z_] := 1/Sqrt[7/10 + 3/10 (1 + z)^3], then evaluate the indefinite integral int[z_] = Integrate[f[z], z]. Close inspection reveals that int[z] has a discontinuity that shouldn't be there - e.g. compare int[1.6527048] with int[1.6527049]. If you evaluate ContourPlot[Arg[int[x + I y]], {x, -3, 3}, {y, -3, 3}] it shows the context for this discontinuity. It appears that the wrong result is due to Mathematica jumping between different branches of Arg, or something like that ...
Oct
14
answered Maximizing a trigonometric function
Oct
13
comment Segmentation of a microscopy image with uneven illumination
You could try Import["http://i.stack.imgur.com/5ni1u.jpg"] // EdgeDetect // DeleteSmallComponents // FillingTransform. The cell at the top has an "invisible" left boundary, so it doesn't get filled in.
Oct
2
comment NIntegrate giving message NIntegrate::slwcon:
If you change the range of integration to {x, -r, 2r}, where r is a random real, then the problem persists, and if you include the option Exclusions -> 0 then the problem goes away. Interestingly, z = 0 is the point in the complex plane z = x + I y where Arg[f[z]] is singular, and it lies exactly 1/3 of the way along the {x, -r, 2r} range of integration. Just wondering ...
Sep
30
comment How to get NMinimize to work
In NMaximize and NMinimize use Method -> "SimulatedAnnealing", MaxIterations -> 500.
Sep
24
awarded  Autobiographer