2,552 reputation
169
bio website stephenluttrell.com
location West Malvern, United Kingdom
age
visits member for 2 years, 3 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!


13h
answered Use Mathematica to calculate the area enclosed between two curves
2d
comment How to put the tensor product of two operators onto two variables?
You can display the results in the form that you want by simply using the Notation package (that I mentioned in my answer above) to map each internal state[index, spin] expression to your required state[spin, index] displayed output. You then get the best of both worlds - convenient internal computations AND convenient displayed output - with the Notation package connecting the two of these together.
2d
comment How to put the tensor product of two operators onto two variables?
The easiest way to get the ordering you want is to define the basis state as state[index, spin] rather than state[spin, index], and to correspondingly adjust the definitions of how the H and S operators act on these basis states. Don't forget to remove the old definitions first, or start with a fresh kernel. Mathematica will then automatically display the result ordered as you want it to be.
Aug
29
comment Can Mathematica solve 625 linear coupled differential equations?
If DSolve or NDSolve don't do what you want, then you could break the solution process down into stages: (1) linearly transform the variables to diagonalise the system of DEs, (2) solve each diagonal DE, (3) transform the solutions back to the original variables.
Aug
29
comment Menu item “Interrupt Evaluation…” missing in V10
I find that the easiest way doing calculations alongside a long running calculation is to open a new notebook, and use Evaluation / Notebook's Kernel to attach the new notebook to an alternate kernel. You set up alternate kernels by using Evaluation / Kernel Configuration Options.
Aug
29
answered How to put the tensor product of two operators onto two variables?
Aug
26
comment Why does Mathematica have trouble with this simple set of simultaneous equations?
If you use // FullSimplify[#, Assumptions -> {x, y, z} \[Element] Reals] & then you get obviously real solutions.
Aug
25
comment Plotting an function defined by an integral
Using e rather than your E, you can avoid doing any numerical integration by using Integrate to symbolically integrate your expression, and then using Simplify with Assumptions -> e >= -1, to obtain (2 Sqrt[2] EllipticF[ArcCos[e]/4, 2/(1 + e)])/(Sqrt[1 + e] \[Pi]). I used Mathematica 10 to do this.
Aug
22
comment DSolve not finding solution I expected
You get the special solution $e^x$ by taking the limit $c \rightarrow \infty$ of the general solution $e^x+\frac{1}{c-x}$.
Aug
15
comment Improving the speed/efficiency of multiple (finite range) convolutions for a causal response plot
You can do the integration in conv symbolically, which means that it needs to be integrated only once. To do this change your definition of conv to conv[t_] = Integrate[twopulse[s]*imp[t - s], {s, 0, t}, Assumptions -> (t \[Element] Reals)]. Note the use of = rather than :=.
Aug
14
comment Test a wooden board's vibration mode
Have a look at the example "Solve a Wave Equation in 2D" here. It shows how you can solve the 2D wave equation over a non-trivial region. For instance, if I understand your diagram correctly, your region would be RegionDifference[Rectangle[{0, 0}, {40, 76}], RegionUnion[Rectangle[{40/2 - 5/2, 76/2 - 68/2}, {40/2 + 5/2, 76/2 + 68/2}], Rectangle[{40/2 - 36/2, 76/2 - 5/2}, {40/2 + 36/2, 76/2 + 5/2}]]]. You would need to define an initial condition to start off the 2D wave solution.
Aug
13
comment how to solve ODE with boundary at infinity
I now see that the OP notes that the solution can be obtained directly with NDSolve, which presumably does an implicit shooting method, so there is no need for the explicit ParametricNDSolve shooting method in this case. Oh well, at least it shows how ParametricNDSolve can be used to implement the shooting method if you really want to do it yourself. So much automation ...
Aug
13
answered how to solve ODE with boundary at infinity
Aug
5
comment Creating a simple interactive app with CDF
It says here that FreeCDF allows "Keyboard entry to numerical fields", so the user does have a way of feeding data to a free CDF.
Aug
5
comment how could I repalce Sqrt[x^2+y^2+z^2] back to r
I fixed the \[Omega], and I added a temporary variable deriv to ensure that step 2 picks up the output of step 1 - i.e. the % that I originally used in step 2 will not work correctly, unless you evaluate step 2 immediately after step 1.
Aug
5
revised how could I repalce Sqrt[x^2+y^2+z^2] back to r
added 2 characters in body
Aug
5
answered how could I repalce Sqrt[x^2+y^2+z^2] back to r
Aug
3
answered Integral with unreliable result
Aug
3
answered Is there a function that, given a fraction, will return the general term of its infinite series expansion?
Jul
26
comment Using Mathematica to help obtain correct analytic formula for logarithm integration
FWIW, here's a Manipulate that might be useful to play with - Manipulate[Grid@Partition[ContourPlot[#[Log[z - a]/(z - b)] /. {z -> x + I y, a -> Complex @@ ac, b -> Complex @@ bc}, {x, -2, 2}, {y, -2, 2}, Axes -> True, ColorFunction -> "Rainbow", PlotLabel -> #, Epilog -> {Red, Thick, Line[{{0, 0}, {1, 0}}]}] & /@ {Re, Im, Abs, Arg}, 2], {{ac, {0, 0}, "a"}, {-2, -2}, {2, 2}}, {{bc, {0, 0}, "b"}, {-2, -2}, {2, 2}}].