Questions about how Mathematica evaluates expressions, tracing evaluation (Trace*), handling expressions in unevaluated form (Hold*, Unevaluated), nonstandard evaluation, etc.

learn more… | top users | synonyms

1
vote
2answers
50 views

Coordinates of MeshPoints

The output of a set of differential equations solved with NDSolve produces a series of curves and I need to obtain the spacing between these curves at a given level ...
2
votes
2answers
54 views

How to apply list of values to a list of functions

I have the following: first= {1+a,2+a,3+a,4+a} and a list t={0,1,2,3} I want to evaluate the first element of "first" at ...
2
votes
1answer
80 views

Block assignments not quite sequential?

With scalars, Block acts like Scheme's let*, that is, the assignments (appear to) happen sequentially: ...
0
votes
2answers
30 views

Parallel evaluation hangs before doing anything

[I use Mathematica 9.0.1.0 on OS X Yosemite 10.10.2.] I am experiencing difficulty with parallel evaluation that I am finding extremely perplexing to troubleshoot. I define the following function in ...
2
votes
1answer
54 views

Show [In] and [Out] tags after quitting Mathematica

I cannot find a way to show [in] and [out] tags when evaluating cells after I close the application. Is there a way to keep these shown? I disabled the kernel in global options but cannot transfer ...
0
votes
1answer
40 views

How to see partial results during evaluation [duplicate]

I am computing a long Table[], but the computation of the last few elements is taking too long, and I am afraid I will never converge. I would like to access the ...
0
votes
0answers
21 views

Cell editing blocked after output generation

when I evaluate an editable cell and get an output cell with the result, then it is no longer editable until I delete the output. This seems to be a new feature in Mathematica 10 or do I simply need ...
-1
votes
1answer
66 views

I have several functions and how I know which one is the maximum in a certain range?

What I did are the followings These lines will generate a piecewise function pw which tells me the corresponding variable given an interval as follows: Now, I want to get: names of variable ...
4
votes
1answer
53 views

Prevent evaluation of certain cells / code segments

I´m not quite sure if I ask a stupid question but I could not find an appropriate answer in the forum... I have a variety of cells (= code segments) in my notebook which I would like to evaluate in ...
1
vote
2answers
92 views

Evaluate a list

I have a function $f(x_1,\cdots,x_n)$ that takes $n$ arguments, and I would like to evaluate it using a list of lists $\lbrace\lbrace x_1,\cdots,x_n \rbrace,\cdots,\lbrace x_1',\cdots,x_n' ...
1
vote
1answer
56 views

Working with derivative of conjugate of a complex number

I have a complex function, lets say $g(x)$. I want to take its and its conjugate's derivative. I need the solution of derivative which must be symbolically and computationally efficient. Lets take an ...
1
vote
3answers
138 views

How can I make a summary of all the commands of Mathematica?

I would like to have a simple way to get summary information about all the many commands built into Mathematica. How could I do this? Is there a site I may refer to?
1
vote
1answer
44 views

How can I force an installed, user-created palette to automatically evaluate?

I have created a palette in Mathematica v10.0.2, and used the Menu-->Palettes-->Install Palette functionality to successfully install it. When I choose my palette (from the dropdown menu), rather ...
0
votes
0answers
68 views

How can I solve this expression?

I'm trying to solve this expression for A, but I'm not sure how. ...
12
votes
7answers
534 views

How to properly inject iterators into table? [duplicate]

Goofing off on a prior question, I was fiddling with other methods, which led me to the need to inject a constructed set of iterators into a table construct. Now, ...
1
vote
1answer
120 views

Is there a way to simplify a symbolic expression at assignment, once-for-all?

I have a series of symbolic function calls that could be greatly simplified using some assumptions. I think I would like for these assumptions to be used in the definition of the function so that they ...
4
votes
2answers
54 views

Automatically scroll along with currently evaluating cell?

If I'm evaluating an entire large notebook, I usually just press Alt-V Y to find the currently evaluating cell. Is there a way to keep the currently evaluating cell automatically in focus so that the ...
1
vote
3answers
94 views

How I create a 'TraditionalForm' expression in which only parts are evaluated?

I have an expression for the form Subscript[W, f[a, b]][c] = ρ^f[a,b]ω[c]ρ^-f[a,b] that I want to render in TraditionalForm ...
0
votes
0answers
47 views

Calculating the rank of an abstract matrix

I'm trying to compute the rank of a 4x4 matrix with 4 parameters and 2 variables. I tried to calculate its rank under some assumptions on those conditions and I kept getting rank 4. So I did an ...
0
votes
1answer
59 views

How to make Mathematica show intermediate steps in integral [duplicate]

I want to know how Mathematica evaluates this integral: $PV \int _ {0} ^ {i \infty} d \tau \, \frac{e^{-\frac{\tau^2}{2 M^2}}(b^2 - 3 τ^2)^2 (|b^2+\tau^2|-(b^2-\tau^2))}{\tau (\tau^2 - b^2)}$, where ...
6
votes
1answer
90 views

Strange behavior when setting NumericQ of a symbol

It happens both in v9&v10. If you try this a^0 a^0 (1/a)^(3/2) a^0 (1/a)^(5/2) Mathematica returns 1 (1/a)^(3/2) (1/a)^(5/2) It's trivial. ...
7
votes
1answer
83 views

Why can't I abort main evaluation from ScheduledTasks (Service Link)?

FrontEndExecute[FrontEndToken["EvaluatorAbort"]] is equivalent of the menu item: Evaluation >> Abort. It works with ...
1
vote
2answers
49 views

function definition with a given list of parameters: how to use Evaluate[] properly?

given a list of variables variables = {a, b, c}; I want to automatically define a function f[{a_,b_,c_},x_] := g[a,b,c,x] ...
1
vote
1answer
49 views

How to make strong assumptions?

Or put in another way, how to make a variable behave as it belongs to a specific domain, even outside the use of simplify or other commands alike? For example: ...
0
votes
0answers
63 views

How to prevent long evaluation and infinite loops

I'm new to this, so sometimes I accidentally ask Mathematica to do calculations with numbers so big that it can't handle it and it immediately freezes my laptop to the point where there's nothing I ...
6
votes
2answers
159 views

There is an issue with Manipulate in which it updates its argument twice in V10

I have asked this question before (here) and I thought that the issue is only when moving the Notebook window. It appears that Manipulate is working in weird manner. ...
1
vote
1answer
54 views

How to evaluate some parts of an expression inside Hold? [duplicate]

I want to return a Hold expression but with some parts pre-evaluated. The easiest way to explain this is probably through code example. Here is what I have ...
2
votes
1answer
66 views

How to abort running evaluation?

I would like to implement a "Stop" Button into a program that basically consists of a loop. Unfortunately I do not how to interrupt the running evaluation. Minimal Example: ...
0
votes
0answers
36 views

Creating a lazy evaluator of th lambda calculus

I have a sub project in my research to write a lazy evaluator of the lambda calculus. How should I approach this problem? I already have a implementation of the lambda calculus would that be of help?
0
votes
1answer
27 views

How to force numeric evaluation?

I need to evaluate the PolyLog function at some points, but I'm interested in numeric values. E.g. PolyLog[3, 2.7] works fine, but PolyLog[3, e] just prints the same PolyLog[3, e]. I somehow need to ...
0
votes
0answers
49 views

subtlety of self-defined function and its evaluation [duplicate]

I wrote a simple code as follows f[x_,y_]:=NIntegrate[x+z,{z,0,1}]; g[x_,y_]:=NIntegrate[y+z,{z,0,1}]; VectorPlot[{f[x,y],g[x,y]},{x,0,1},{y,0,1}] then ...
1
vote
0answers
82 views

Smart pointer for Mathematica?

Would the implementation of the smart pointer idea be possible in Mathematica ? Let's say I have an object "o" of the form Class[object] where object is an Association, and Class has the HoldFirst ...
1
vote
1answer
53 views

Trying to calculate derivatives of spherical harmonics

I am trying to confirm what is shown on this website: http://functions.wolfram.com/Polynomials/SphericalHarmonicY/20/01/01/0001/ But when I type ...
7
votes
2answers
255 views

Using up-values and down-values

I have a problem I'm trying hard to find a solution for, although I don't know if a solution exists. The following rules produce the result e[2].f[] ...
1
vote
1answer
36 views

Evaluation order in polynomials

I'm confused by the evaluation order of polynomials containing division. Consider these two polynomials: (x^2 + y) z/w (1) a/b (2) And their tree ...
3
votes
1answer
58 views

Why doesn't my expression evaluate at the subkernel?

Consider this code: ...
3
votes
2answers
41 views

Evaluation control with TagSet

Suppose I have a property associated with two functions using TagSet: ...
0
votes
1answer
41 views

Why returning False? [closed]

Can anyone explain the false? I'm trying to grab co-efficient in front of X^2 I think. I say I think as I'm following my tutors example using his screenshot the only difference between his question ...
2
votes
0answers
112 views

Mathematica shift-enter problem

Would really appreciate if someone can help with this problem: When I first open a Mathematica note book, say you do 1+2 and press shift-enter. As expected, I get "3" as the output. Now suppose you ...
1
vote
2answers
73 views

Is this caused by round-off errors?

Let's consider this integration Integrate[ E^(4 n x s) (1 - x)^(-1 + 4 n μ) x^(-1 + 4 n ν), {x, 0, 1}] It returns ...
0
votes
2answers
55 views

Failed to use N[%] for a infinite series

I am trying to evaluate a infinite series: $$ 2 \sum _{l=1}^{\infty } \Re\left(n^{\frac{2 i \pi l}{\log (q)}} \Gamma \left(\alpha -\frac{2 i l \pi }{\log (q)}\right)\right) $$ With the code: ...
4
votes
3answers
140 views

Getting terms and only evaluate specific parts

I want to expand the expression but I do not want it to evaluate. Sum[(HoldForm[1/(2 # - 1) - 1/(2 # + 1)] &)[i], {i, 1, 6}] However if you evaluate this you ...
0
votes
1answer
45 views

Unknown Power showing up in Formula [closed]

I have the following worksheet below. (I took a screen shot because I didn't know how to type the code for the particular function). Circled in red are powers that shouldn't be there and yet ...
5
votes
1answer
158 views

How to understand the difference between Sqrt and Log after ClearAll them

I came across this post, here I change the last line of the code Unprotect[Sqrt]; Sqrt[x_] = "blahblah"; Protect[Sqrt]; Sqrt[2] "blahblah" ...
0
votes
0answers
98 views

How to speed up my code with constructing matrices

I have run this program for a long time to get the result for n = 2048(about 5hours) and no more result till now (can't run with n = 4096). I would know how to make it more efficient. Any help or ...
3
votes
2answers
256 views

How to NOT simplify fraction

How can I prevent Mathematica from simplifying fractions? What I would like to do is run a test on a list of fractions to see how many are in their reduced form. For example, I have a list: ...
0
votes
0answers
71 views

Trying to Simplify an Expression

I'm trying to simplify an expression: ...
5
votes
2answers
234 views

Associativity of `/@` [duplicate]

Why are the following not equivalent: Map[Line, Map[(Print[#]; #) &, {{{2, 1}, {1, 1}}, {{-2, 1}, {3, 1}}}]] which produces ...
5
votes
2answers
114 views

Why does Rule behave like this?

Why does {x, x^2, x^3, a, b} /. x^n_ -> f[n] result in {x, f[2], f[3], a, b} when ...
2
votes
1answer
123 views

Expanding huge expressions that simplify and factor

The following is for Mathematica 8.0.4 running on Windows 7 laptop (6GB memory). I have eight expressions that are unexpanded multivariate polynomials in 6 variables. They are huge expressions, so ...