# Tagged Questions

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

37 views

### Mathematica Not finding Eigenvectors? [duplicate]

I have the following matrix: mat = {{-60., 0., 2.1*10^-35 II + 2.1*10^-35 (-1. II + Istar), 2.1*10^-35 II + 2.1*10^-35 (-1. II - 4.7619*10^6/Istar)}, {-6.4*10^22 II - 6.4*10^22 (-1. II - ...
15 views

### How to evaluate a function for a parameter with a range of values? [closed]

I have a function given below ...
365 views

### Why doesn't Mathematica evaluate this limit? [closed]

I am trying to evaluate a few limits in Mathematica, and I can only get it to evaluate them in certain cases. I don't fully understand the evaluation order and when it substitutes numerical values in ...
66 views

### Why doesn't Mathematica abort evaluation when I tell it to?

This frequently happens to me. I'll have some code, execute it, and realize it's taking a long time. My PC isn't frozen, and Mathematica itself isn't even frozen: I can select stuff in the notebook, ...
147 views

### What is the Difference Between Rule (->) and RuleDelayed (:>)?

I am new to Mathematica so this question may seem rudimentary. Sorry for that! :) I want to implement the well-known property of Kronecker's Delta \Sigma_{i=1}^{n} a_i \delta_{ij}=a_j,\quad 1 \le ...
120 views

### Working with ScheduledTasks inside DynamicModules

I have a question - is it possible to run ScheduleTask[] inside DynamicModule[]? What I have tried so far: ...
200 views

### Where does a package have to be loaded?

I'm trying to solve a very tricky issue in my function. The function needs the NDSolveFEM framework. Here is a minimal example: ...
609 views

### How do I get Mathematica to return a function call unevaluated?

How do I get Mathematica to return a function call (conditionally) unevaluated? I expect this may use the slightly-mysterious Hold function. As a toy example, ...
154 views

### After NumberForm I cannot apply a Sine function. Why?

After NumberForm I cannot apply a Sine function. Why? This works: sol1 = x /. Solve[x^2 - 3 == 0, x] Sin[sol1] Output = $\{-Sin[\sqrt{3}],Sin[\sqrt{3}]\}$ Also ...
60 views

### Unpacking NumberForm expressions

Given a NumberForm expression, e.g.: NumberForm[N[Pi], 10] How does one get the underlying numerical expression (short of ...
81 views

### Blocking dialog with a blocking child dialog

Suppose I have a DialogInput, in which there is a Button. The Button can trigger another <...
496 views

### Result about Context is inconsistent with the description of “Power Programming with Mathematica”

x = 5; tempx = 6; Begin["temp"] {x, Globalx, tempx} The result in my Mathematica session is {5,5,6}, but it's ...
132 views

### Evaluating summations involving Fibonacci numbers in terms of Fibonacci numbers

There are many summations involving Fibonacci numbers which Mathematica 10.4 is able to evaluate directly in terms of Fibonacci numbers. For example, Mathematica evaluates the summation given below as ...
33 views

### Mathematica won't evaluate on the first run & problem with code highlight

When I start Mathematica, the first evaluation always takes forever even it's as simple as x = 2, and when I halt the evaluation with ...
50 views

### Chains of approximate numeric equalities

Mathematica considers two numbers equal if "at most their last seven binary digits" differ. For example: ...
298 views

### Remove versus ClearAll

What is the difference between Remove and ClearAll? I thought that "not being recognized by Mathematica", which is the effect ...
2k views

### All curves in plot have the same style. Cannot be fixed with Evaluate[]

Usually, when I plot multiple curves in Mathematica Plot[{x,x^2,x^3},{x,0,1}] they are given different colors. However, if I try to construct a list inside the <...
58 views

### How to wait a Cell in a Notebook to be executed until another Notebook's Cell expressions executed?

I have two Notebooks and I call the second Notebook from the main but main Notebook's expressions continue executing. I want them to wait until the second Notebook's expressions execution is finished! ...
89 views

### Evaluation of a Notebook

I am new to Mathematica so I do apologize if my question is too elementary. In the start of my notebook, I want to make sure that any previous definitions are wiped out so I use the ...
423 views

### Nothing not behaving as expected?

I was thinking that Nothing was doing the same job as the vanishing sequence ##&[]. Yet this exemple shows it doesn't. ...
32 views

### The problem encounterend while calling a sub notebook from the main notebook

I have two notebooks; one of them is the main notebook which will call the second notebook several times in a loop and inside this loop, matrix called as ALLB, defined in the main notebook, will get ...
133 views

### Multiplication non-deterministic?

I have two vectors of 134 elements each ($mu$, and $gt$). $mu$ contains Integers, and $gt$ contains machine precision Reals. I execute the following simple expression multiple times without changing ...
43 views

### How to use Set correctly

My codes are shown in the picture attached. I'm writing codes for numerical calculations frequently, and I think it looks neat and clear to organize input parameters in the form of table. For example,...
314 views

### Understanding evaluation and typesetting

Background So, one could be surprised by the fact that: Hold @ Grid[{{1, 2}}] (*or*) Hold @ Graphics @ Disk[] This issue and methods of prevention are ...
84 views

### How to define a function which takes another function as input in Module

Let $f$ be a function of $n$. I would like to define a function $A$ with module which takes $f[n]$ as input. So for example: ...
102 views

### Can evaluation show what was evaluated along with results? [duplicate]

After I write and evauate the following lines in Mathematica: a = 1 b = 2 x = a + b It will show only the result : 3. I want mathematica to show the following ...
39 views

### Evaluating a function after simplifying to avoid infinite expressions

My Poly[j_, s_] function simplifies to a polynomial for all j. So I defined a PolySim[j_, s_] = Simplify[Poly[j,s]] function. However, if I try to evaluate PolySim[j,0], since this is PolySim[j,0] = ...
124 views

### NIntegrate evaluates its 1st argument while it has the attribute HoldAll?

NIntegrate owns the attribute HoldAll: Attributes@NIntegrate (* {HoldAll, Protected} *) ...
124 views

467 views

### Gâteaux (directional) derivatives and higher order differentials of a functional

I would like to calculate the Gâteaux derivative of a functional (i.e. a function depending on functions). A simple example for the Dirichlet functional: $L(u(x))=\int_0^1 \frac{1}{2} (u'(x))^2 dx$ ...
78 views

### Help on order of evaluation within plot function

it is my first time asking a question here so please let me know if there's anything I should be doing that I'm unaware of. I'm sure the answer to my question already exists on the site but I'm having ...
35 views

### Creating a non-zeta-ified sum

The expression Sum[i^(-s), {i, 1, ∞}] evaluates to Zeta[s] But, of course, this is not strictly correct as ...
70 views

42 views

### Parallelization and efficiency improvement

Hey i am new to mathematica and at the moment i am writing some test code. It works but it is unrefined. I try to make it more efficient by using parallelization or other techniques. I wanted to ask ...
501 views

### Is there a method to send different Cell evaluation to different core?

I am running Mathematica on a computer with multi CPU and every CPU has multicore. I am wondering if there exist a method to send different cell evaluation to different core? So if I already have a ...
111 views

### Evaluate pure function through round brackets

In have some matrices of pure functions or numbers which I multiply by other matrices or vectors. I would like the functions to be evaluated in the result, but all that I get is something like this: <...