Reputation
69,235
Next tag badge:
100/100 score
20/20 answers
Badges
5 168 389
Impact
~790k people reached

Feb
11
comment ContourPlot or DensityPlot ColorFunction with x, y and z arguments
The colouring and the contours are treated separately by specifying one as "the function to plot" and the other as "mesh functions". Instead of using mesh function, you could generate the contour lines with ContourPlot for better quality, then combine with Show.
Feb
11
comment ContourPlot or DensityPlot ColorFunction with x, y and z arguments
This is not going to be of as good a quality as ContourPlot, and it's again just a hack: DensityPlot[(x - 2 Pi) Sign[Cos[x] + Cos[y]], {x, 0, 4 Pi}, {y, 0, 4 Pi}, MeshFunctions -> {Function[{x, y}, Cos[x] + Cos[y]]}, Mesh -> 5, PlotPoints -> 100, ColorFunction -> "RedBlueTones", Exclusions -> None]
Feb
11
comment ContourPlot or DensityPlot ColorFunction with x, y and z arguments
Not if the docs are correct. ContourPlot appears to pass only a single value. You could try to generate the contours and the background colour separately, then combine them together to achieve the effect.
Feb
11
revised Help on how to write a function to be used with NMinimize
added 59 characters in body
Feb
11
comment setting real parameters in Hamiltonian matrix
en.wikipedia.org/wiki/Casus_irreducibilis
Feb
11
comment setting real parameters in Hamiltonian matrix
The matrix you give is a symbolic one, and Eigenvalues returns symbolic Root objects. How did you arrive to complex eigenvalues? The matrix is symmetric, so they are always supposed to be real. Finding the eigenvalues of this matrix symbolically or with exact numbers amounts to solving a cubic equation. The solutions of some cubic equations can't be written in an explicit form (in terms of radicals) without using the imaginary unit, but this does not mean that they are not real. It is possible that this is what happened when you substituted in numbers.
Feb
11
comment How to find the package file that stores a certain symbol?
I'll admit that I didn't try to understand how it works, I just tried it on the package I wanted to do this with last time: safeGet["OpenCLLink`"]. Unfortunately it seems to go into an infinite recursion.
Feb
11
comment listplot very large numbers
The workaround to use is what rasher said. One more thing to mention is that while in general Mathematica can handle arbitrary precision numbers, Plot (and Graphics) will only work with machine precision numbers, i.e. numbers smaller than $MaxMachineNumber.
Feb
11
revised When and why are Assuming and Assumptions not equivalent?
added 66 characters in body
Feb
11
revised When and why are Assuming and Assumptions not equivalent?
added 271 characters in body
Feb
11
comment Usage of Assuming for Integration
There's one problem with this difference between Assuming and Assumptions: the result gets cached if Assuming is used first, and the Assumptions version will return the cached result later.
Feb
11
comment When and why are Assuming and Assumptions not equivalent?
@Artes So then both this one and the other one are practically duplicates of that question. Do you agree?
Feb
11
comment Simplification of integrals depending on a parameter
@rcollyer Are you sure it's not due to the order you evaluated them in? Please see here.
Feb
11
asked When and why are Assuming and Assumptions not equivalent?
Feb
11
comment Simplification of integrals depending on a parameter
@rcollyer This is very weird. Try quitting the kernel, then evaluate your example first with Assuming then with Assumptions. Both give 0. Now quit again, then evaluate first using Assumptions then with Assuming. The first one does not give 0, the second one does. The first one doesn't give zero on re-evaluation either. (Cached result?) I smell a bug.
Feb
11
comment Get Coordinates 4 significant digits limitation
@SimonWoods Strange indeed, especially considering that using Identity still gives only 4 (that's where I stopped looking at that option).
Feb
11
comment Simplification of integrals depending on a parameter
@rcollyer And again, it only returns 0 if you use Assuming but not if you use Assumptions.
Feb
11
comment Simplification of integrals depending on a parameter
Here's a weird thing: Integrate[Sin[x]*Sin[n*x], {x, 0, Pi}, Assumptions -> Element[n, Integers]] does not return 0. I thought that Assuming[something, Integrate[...]] and Integrate[..., Assumptions -> something] were always equivalent. Is Assuming affecting something used internally by Integrate?
Feb
11
comment Get Coordinates 4 significant digits limitation
I'd report it as a bug ...
Feb
10
answered Generating list of coordinates in $\mathbb{Z}^n$ given by set of inequalities