1,876 reputation
159
bio website stephenluttrell.com
location West Malvern, United Kingdom
age
visits member for 1 year, 10 months
seen 14 hours 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!


Apr
15
comment Summing a trig series
Using n0 rather then N, if you split up the summand as a series of powers of Cos[(2 \[Pi] m)/n0] - Cos[(2 n \[Pi])/n0], giving (Cos[(2 \[Pi] n)/n0] (Cos[(2 \[Pi] m)/n0] - Cos[(2 n \[Pi])/n0]))/2 + Cos[(2 n \[Pi])/n0]^2 + Cos[(2 n \[Pi])/n0]^3/(2 (Cos[(2 m \[Pi])/n0] - Cos[(2 n \[Pi])/n0])), then Mathematica (version 9) can sum up (excluding m = n) the contribution from each power.
Apr
12
comment Solving a single equation with multiple parameters
You can use SolveAlways if you series-expand the equation first. Thus expr = Cos[x]^2 - (a Cos[b x + c] + d); eq = (Series[expr, {x, 0, 4}] // Normal) == 0; sol = SolveAlways[eq, x] gives the solution {{a -> Sec[c]/2, b -> -2, d -> 1/2, Sin[c] -> 0}, {a -> Sec[c]/2, b -> 2, d -> 1/2, Sin[c] -> 0}}, which also solves the equation when it is series-expanded to higher orders as well.
Apr
8
comment Solving a system of two equations of third degree
It depends what you mean by "closed-form explicit"! I sense that you actually want a solution expressed in terms of "elementary" functions, but in this case you are out of luck because the polynomial degree is too high.
Apr
8
answered Solving a system of two equations of third degree
Apr
8
comment Simplify matrix into an upper triangular matrix
Maybe this is what you want: QRDecomposition[m] yields the QR decomposition for a numerical matrix m. The result is a list {q,r}, where q is an orthogonal matrix and r is an upper-triangular matrix.
Apr
7
comment How to solve this numerically?
I had another think about my solution when I read Andrew Cheong’s answer below. Define f1[a_,b_]:=<LHS #1>; f2[a_,b_]:=<LHS #2>, where "LHS" means "left hand side", then evaluate ContourPlot[{f1[a, b] == 0, f2[a, b] == 0}, {a, -50, 50}, {b, -50, 50}, ContourStyle -> {Red, Blue}, PlotPoints -> 100], where any solution corresponds to an intersection between the red and blue contours. Ignoring near-solutions where contours run very close to each other, there are 2 solutions: (1) close to (10,10) as noted by Andrew Cheong below, and (2) at {1.69024…, -1.25858…} as found in my answer above.
Apr
2
answered How to solve this numerically?
Apr
2
comment Loop integrals (quantum field theory)
It would be useful to inspect how the integrand behaves as a function of complex k. Thus define f[k_, p_, m_, x_, d_] := (k^(d - 1) (k^2 + p k + m^2))/((k - (x - 1) p)^2 + p^2 (x - x^2 - 1))^2, then display contour plots of Abs[f] and Arg[f] in the complex k plane using (for instance) ContourPlot[#[f[kr + I ki, 1, 1, 1, 4]], {kr, -3, 3}, {ki, -2, 2}, Axes -> True] & /@ {Abs, Arg}. You can then see how Mathematica represents the function, and it helps you to split up the range of integration so it follows the intended path — e.g. which way to go around singularities.
Mar
29
comment Fitting to a sigmoidal model
This does what you want: FindFit[data, {1/((Exp[-4 (1 - 1/X1) t] ((1 - 1/X1) - z0))/z0 + 1), X1 < 0, z0 > 0}, {X1, z0}, t]. You have to add a couple of constraints to FindFit to point it towards the region where the solution lies.
Mar
8
awarded  Nice Answer
Mar
4
comment Where do Mathematica's probability functions draw a line in the sand for predicates?
... where ?NumericQ is the secret sauce!
Mar
3
answered Commutative algebra by generators and quadratic relations
Mar
3
comment Commutative algebra by generators and quadratic relations
Does a^3 //. {a^n_ /; n >= 2 :> a^(n - 2)\[CircleTimes]b} do what you want?
Feb
24
revised Using Mathematica in Conjunction with LyX. Path Issues?
added 16 characters in body
Feb
24
answered Using Mathematica in Conjunction with LyX. Path Issues?
Feb
18
answered Inconsistent results for equivalent converging symbolic integrals
Feb
17
comment How to get rid of all complex numbers and functions?
It's so closely related to the already-accepted answer that I judged it to be more of a comment than an independent answer.
Feb
17
comment How to get rid of all complex numbers and functions?
FWIW I found that FullSimplify[TrigToExp[expr]] gets you to the same answer more quickly (I have 9.0.1 on OS X).
Feb
17
comment Multiple NIntegrate (again)
You need to insert ?NumericQ tests. For instance, you could do this: Qb[(R_)?NumericQ] := NIntegrate[Qb2[R, c], {c, 0, Infinity}]; Qb2[(R_)?NumericQ, (c_)?NumericQ] := Exp[-c^2] NIntegrate[If[R < Sqrt[c^2 - 2 c z], R/Sqrt[c^2 - 2 c z], 1], {z, -1, 1}]; Qb[3.7] which gives 1.13579.
Feb
14
comment eigenvalues and eigenvectors without Root answers
Using version 9.0.1 for OS X, I don't see any Root objects in {evals, evects} = <your matrix> // Eigensystem // Simplify. Mathematica symbolically solves your eigensystem problem with no fuss.