# Questions tagged [evaluation]

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

1,554 questions
Filter by
Sorted by
Tagged with
245 views

### Is it possible in Mathematica to get a step-by-step evaluation of the following?

Is it possible in Mathematica (or WolframAlpha["...]") to get a step-by-step evaluation of the following? ...
1 vote
31 views

### Monitor inside core function

I like DistanceMatrix: its performance is surprisingly high, even for a big data. However, for a huge arrays and custom ...
60 views

...
1 vote
54 views

### Elliptic theta function wont evaluate [closed]

It appears that Mathematica wont evaluate the Jacobi theta functions when the last argument has a magnitude greater than 1, for example: EllipticTheta[1, 1.5, 0.9] ...
1 vote
80 views

### SortBy does not work correctly when nest in Evaluate in With in Block

I have got some formula in Mathematica, then I want to pass value to verify them. full code ...
163 views

### How to maintain the input form of InputField?

I created a Manipulate with InputField: ...
74 views

### Same code behaves differently as a pure function and a function, and insider another function

I have a rule-transformer that takes a list of rules (and a list generator = {σ[z], σ[-1], σ}) ...
48 views

### How to apply a transformation to a total derivative?

I want to transform total derivatives into normal derivatives: Dt[r, t] == -r*Dt[v, x] - v*Dt[r, x] /. Dt[f_, s_] :> D[f[x, t], s] To get: ...
97 views

### How to force evaluation of RuleDelayed?

(I'm not sure if the title of this question is appropriate, sorry!) After defining selfApply function that resolves the mutual references contained in Association, I wrote the following code: ...
363 views

### Eigenvectors are divided by zero depending on evaluation, 6x6 matrix

I calculated the Eigenvectors of the $6\times 6$ matrix $m$ with parameters $(a,b,c,d,e,f)\in \mathbb{R_{\ge 0}}$. If I set e.g. $b\rightarrow 0$ after calculation, then 4 of the 6 Eigenvectors are ...
434 views

### Eigenvectors are divided by zero depending on evaluation, 4x4 matrix

I calculated the Eigenvectors of the $4\times 4$ matrix $m$ with parameters $(a,b,c,d)\in \mathbb{R_{\ge 0}}$. If I set e.g. $b\rightarrow 0$ after calculation, then some of the Eigenvectors are ...
46 views

### Evaluation gives different results before and after simplifying expression

I am trying to evaluate $h(z)=\frac{f(z)}{g(z)}$ at points $z$ close to 0. Here I have taken an example value of $z=\texttt{z1}=10^{-7}$ for demonstration. I notice that evaluating the fraction before ...
85 views

### How to prevent evaluation without simplification?

I am trying to compute a sequence of terms, which have a form similar to $g(z)$ at different points $z$. For $z$ close to 0, I have observed that the terms are evaluated as 0/0 (indeterminate form) ...
47 views

### Passing an unevaluated test

I want to write a function (in a package) that takes a boolean test as an option. Here's a toy example to illustrate what I have in mind: ...
1 vote
143 views

### Newton Raphson 0th order with gauss elimination error

I'm trying to do a Newthon Raphson with 1st order continuation to solve a problem with 4 variables (fix 2 and obtain the results of 2 (x and Chi). ...
1 vote
57 views

### FindMinimum can't evaluate Nearest numerically

I'm trying to use Nearest as a function to minimize over: a toy example is ...
59 views

### Automatic evaluation of a function for variable values defined from different data tables in the attachments

I want to evaluate a function whose variable values are defined in different data files. I want to know that how can I write code such that when the function's evaluation is exhausted for one table, ...
42 views

### How to find a positive minimum of a function?

How can I find a positive minimum of f and its corresponding R0? ...
1 vote
38 views

### How to clear all definitions/symbols declared in all sections with the given tag?

Consider a list of chapters/sections etc. that have the same tag, say, "evaluation". Could you please tell me how to clear all the functions/symbols/definitions etc. that have been defined ...
19 views

### Writing Files In NMinimize - Variables Not Evaluating

I am trying to use minimization with an external process. To do this I need to write a file to be used as input for the external process. However, when a function that writes a value to file is called ...
31 views

### Key Command for "Evaluation -> Quit Kernel -> Local" on Mac

I have an accidental run away loop in some code and Wolfram Desktop 13 is frozen. Usually when this happens I simply execute "Evaluation -> Quit Kernel -> Local". This time however its ...
1 vote
75 views

### Problem with the Manipulate command

I am trying to upload a notebook with the following code to my blog, but every time I upload it, the "manipulate" code does not give anything. Do I have to change anything? ...
186 views

### Listing all user-defined definitions used in a function call

Is it possible to obtain all user defined definitions (and attributes) that are used in the evaluation of certain command (or alternatively just their symbols which I could imagine being easier when ...
73 views

...
1 vote
74 views

### Unwanted reevaluation in Manipulate with RandomPointConfiguration

Here is a simple illustration of a problem I am encountering. I want to use RandomPointConfiguration inside Manipulate, but it ...
26 views

### Silly question about holding an expression in a sum [duplicate]

Sorry about this dumb question in advance. Suppose I evaluate this : test[x_, y_] := Laplacian[x^2 + y^2, {x, y}] test[x, y] /. {x -> 1, y -> 1} (*4*) Now if ...
29 views

### Keep specific case of function unevaluated until defined while general case is defined

I'm solving a particular differential equation and I have the Laplace transform of y[t], Y[s]. Naturally, my next step is y[t_]=InverseLaplaceTransform[Y[s],s,t]. ...
159 views

### How can I make Table of Defer[Sqrt[3i] - k Sqrt[3j]]?

I am trying to make a Table of expressions Defer[Sqrt[3i] + 2 Sqrt[3j]], e.g ...
1 vote
51 views

### Evaluate all If branches [duplicate]

In Mathematica, I have the following code: f1[x_] := 1; f2[x_] := 2; f[x_] := If[x > 5, f1[x], If[x < 0, f2[x], 3]] f[x] Which produces the following output:...
1 vote
62 views

### Why doesn't Sequence@@ work inside Manipulate[]?

I'm trying to use Manipulate[] and I need to have a non-fixed amount of sliders. I tried writing something like: ...
106 views

### How to evaluate expression completely?

In MMA 13.2, if we run Quantity[1, 1/"DegreesCelsius"] it automatically throw a message But if we run ...
66 views

### How to make faster of a code containing more iteration point? [closed]

I am trying to evaluate a code of the Power Series Solution method to get the results. Also, the time of evaluation depends on the parameters I am using. When the iteration point is 50, 60, or 80, it ...
64 views

### Code doesn't stop running - how to fix Part::partw? [closed]

I have this code divided into two notebooks, the first notebook is running just fine, and It gives some information that the second notebook uses, like some variables. The second notebook exhibits the ...
41 views

### How can I suppress the multiple redrawing of Manipulate charts every time, on every evaluation after editing code....?

How can I suppress the multiple redrawing of Manipulate charts every time, on every evaluation after editing code.... After coding a few lines, and evaluating I end up having many many Manipulate ...
1 vote
44 views

### Avoiding NDSolve symbolic calculation

I'm trying to solve the following differential equation, involving a nonlinear ff2 (discrete) function ; however, something goes wrong, as NDSolve tries to compute ff2 symbolically. ...
107 views

### SetDelayed assignment not producing expected result when using ReplaceAll

In Mathematica, I am surprised that the following code does not do what I expect (what I expect is in comments after each evaluation). The problem seems to be due to the fact that when I define test ...
1 vote
47 views

### Unable to evaluate integral in DSolve solution

I define the PDE PDE1 = \[Rho] G[q, w] - (\[Rho] w + S - q) D[G[q, w], {w, 1}] - \[Mu] q D[G[q, w], {q, 1}] which Mathematica is able to solve in terms of an ...
196 views

### A simple question about syntax: how to shorten [email protected]@

Consider the following function: ...
84 views

### Using Cases to select expressions from a list

I am using v12.2.0 on Win7-x64. I want to use Cases to select the Times and Plus cases from ...
1 vote
49 views

1 vote
29 views

### Block the appearance of the dialog windows "The kernel is not responding to a Dynamic Evaluation" and "Abort Dynamic Evaluation" [duplicate]

I have high-demanding Mathematica task which uses a lot of CPU. Its evaluation is interrupted with two types of an annoying dialog window. The first one is "The kernel is not responding to a ...
1 vote
94 views

### Optimizing my code to solve nonlinear system

I have solved a non-linear system using Eliminate[] and Solve[], using a really nice answer found here I am able to use ...