Questions tagged [evaluation]

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

Filter by
Sorted by
Tagged with
5 votes
2 answers
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_student's user avatar
  • 605
1 vote
0 answers
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 ...
lesobrod's user avatar
  • 1,197
0 votes
1 answer
60 views

ArcLength Function Outputting an Integral and Not a Value [closed]

...
Luke Hand's user avatar
1 vote
0 answers
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] ...
Matt Majic's user avatar
1 vote
2 answers
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 ...
eason's user avatar
  • 197
2 votes
3 answers
163 views

How to maintain the input form of InputField?

I created a Manipulate with InputField: ...
Hoony's user avatar
  • 1,470
0 votes
2 answers
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], σ[1]}) ...
Lelouch's user avatar
  • 513
2 votes
1 answer
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: ...
user6552's user avatar
  • 363
2 votes
1 answer
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: ...
user14061's user avatar
3 votes
4 answers
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 ...
granular bastard's user avatar
4 votes
3 answers
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 ...
granular bastard's user avatar
0 votes
1 answer
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 ...
sai's user avatar
  • 121
2 votes
2 answers
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) ...
sai's user avatar
  • 121
0 votes
0 answers
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: ...
Chris K's user avatar
  • 19.5k
1 vote
1 answer
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). ...
Larissa Santos's user avatar
1 vote
1 answer
57 views

`FindMinimum` can't evaluate `Nearest` numerically

I'm trying to use Nearest as a function to minimize over: a toy example is ...
Adam's user avatar
  • 3,897
0 votes
0 answers
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, ...
SciJewel's user avatar
  • 361
0 votes
0 answers
42 views

How to find a positive minimum of a function?

How can I find a positive minimum of f and its corresponding R0? ...
Math_student's user avatar
1 vote
1 answer
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 ...
John Taylor's user avatar
  • 4,642
0 votes
0 answers
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 ...
N.J.Evans's user avatar
  • 5,063
0 votes
0 answers
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 ...
Evan Diehl's user avatar
1 vote
0 answers
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? ...
Athanasios Paraskevopoulos's user avatar
6 votes
2 answers
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 ...
Kvothe's user avatar
  • 4,197
0 votes
1 answer
73 views

Why can't I add to an array from another array inside a for loop

...
random_0620's user avatar
1 vote
1 answer
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 ...
Russ Lyons's user avatar
2 votes
0 answers
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 ...
Charlie's user avatar
  • 506
0 votes
0 answers
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]. ...
Pavel's user avatar
  • 183
5 votes
2 answers
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 ...
Laurenso's user avatar
  • 1,000
1 vote
0 answers
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:...
Chameleon's user avatar
  • 275
1 vote
1 answer
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: ...
Nuno Catalão's user avatar
4 votes
1 answer
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 ...
matheorem's user avatar
  • 16.9k
-2 votes
1 answer
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 ...
supragyan priyadarshinee's user avatar
0 votes
1 answer
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 ...
Laura Martins's user avatar
0 votes
0 answers
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 ...
Lea Rebanks's user avatar
1 vote
0 answers
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. ...
Nick87's user avatar
  • 11
2 votes
3 answers
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 ...
sg1234's user avatar
  • 269
1 vote
1 answer
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 ...
Anthony's user avatar
  • 155
2 votes
3 answers
196 views

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

Consider the following function: ...
John Taylor's user avatar
  • 4,642
5 votes
0 answers
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 ...
Syed's user avatar
  • 41.7k
1 vote
1 answer
49 views

A problem with the evaluation of expressions using assumptions through Mathematica

I want to evaluate the expression below, $((2 (a_{01}+2 ya_{02}+x a_{11})^2+(b_{01}+2 y b_{02}+x b_{11})^2) (2 (a_{10}+y a_{11}+2 x a_{20})^2+(b_{10}+y b_{11}+2 x b_{20})^2))$, at $x=-((2 (2 a_{02}a_{...
VH84's user avatar
  • 179
2 votes
1 answer
174 views

Can one use Break inside Switch?

The documentation for Switch states that "You can use Break, Return, and ...
Glenn Welch's user avatar
0 votes
1 answer
79 views

Dealing with exponents that contain units?

Many of the equations I deal with involve powers of quantities which contain units. However, when the exponent contains units (e.g., ...
dalamajama's user avatar
0 votes
1 answer
55 views

Evaluating an integral of geometric Brownian motion

I am a Mathematica novice. For an operations research application, I am trying to work with the following wealth process in Mathematica, $$ d W_t = (\rho W_t + P_t) dt\ , $$ where $P_t$ is a stream ...
Anthony's user avatar
  • 155
11 votes
2 answers
1k views

What is a function?

Regarding: Map[#[{2, b}] &, {Reverse}] The above works, but it makes my head spin. The documentation for Map says that the ...
Chris 's user avatar
  • 447
0 votes
1 answer
35 views

What is the relationship between a list of symbols created by a specific name, and a expression with such a name?

I'm trying to create a list of symbols called "x" for calculating symbolic gradients of some functions, so I write: ...
Xudong's user avatar
  • 3
0 votes
1 answer
42 views

Expression for variance of a truncated distribution as a function of the point of truncation

I am working on a project where I need to calculate variance of a truncated distribution. Suppose $X$ has some distribution and $x\in\mathbb{R}$. I am interested in $var(X|X\leq x)$. Given some ...
Jan's user avatar
  • 143
1 vote
0 answers
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 ...
John Taylor's user avatar
  • 4,642
1 vote
0 answers
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 ...
Weierstraß Ramirez's user avatar
0 votes
1 answer
72 views

Find solutions after using Eliminate

I have used Eliminate[] to reduce a system of equations as found here, I then proceeded to verify that indeed my system has zeros using this code. My question is, ...
Weierstraß Ramirez's user avatar
1 vote
1 answer
85 views

The ultimate output control method

The ultimate substance of all matter is the atom, likewise, the ultimate substance of mathematica cell is the cell expression, and it can be obtained easily. After copying the cell expression, and ...
imida k's user avatar
  • 4,047

1
2 3 4 5
32