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

learn more… | top users | synonyms

0
votes
1answer
142 views

Slow Dynamic Button Does Not Print [duplicate]

Possible Duplicate: Why do buttons with ChoiceDialog freeze the front end? Why is SystemDialogInput failing to return a save file path? Evaluation inside Button stops after some seconds I ...
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 ...
0
votes
1answer
58 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 ...
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 ...
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: ...
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 ...
0
votes
1answer
56 views

Defining a function with algebraic parameters

I am trying to define and use a function to represent the eigenstates of a Quantum Harmonic Oscillator, which have the general form: $$\psi_{n}(x) = \frac{1}{\sqrt{2^{n} n!}}\left(\frac{m \omega}{2 ...
0
votes
1answer
37 views

How can I get numerical answers to integrals involving the error function?

This is the integral I am trying to evaluate in mathematica: Integrate[Exp[-p^2/(m w h)], {p, -Infinity, Sqrt[h m w]}] Can someone show me how to get a numerical answer out of this?
0
votes
1answer
52 views

What's the difference between this differentiation? [closed]

I've tried to evaluate a sum and get a result in terms of Zeta function. And I have results in two forms: ...
0
votes
1answer
95 views

Simplifying a symbolic product of rational powers

I'm trying to symbolically evaluate a lot of equations that can consist of up to 10 parameters. The form of these expressions is a product/quotient of rational powers of the mentioned parameters, ...
0
votes
1answer
352 views

How does Mathematica interpret a expression?

I'm a beginner to Mathematica. I'd read several document. But I still have a problem. For example, every expression in Mathematica are of the form ...
0
votes
1answer
45 views

Resolving Error: Mathematica evaluation order on Lists

I have a table that is 27 x 27, each entry corresponds to an element from the periodic table. I use the replacement rules in element list to allow me to convert a list of elements into a list of ...
0
votes
1answer
107 views

Symbolic integral including Hermite polynomial does not evaluate

I am trying to evaluate the following integral: Integrate[HermiteH[n, Sqrt[a]* x] * Exp[- (c/2)* (x^2 + y^2) + b* x * y - (a * x^2)/2], {x, - Infinity, Infinity}] ...
0
votes
2answers
227 views

Defining Piecewise Functions in Modules

In short, my question is the same as my previous one except that everything is now wrapped up in a module. The relevant code I'm working with is: ...
0
votes
1answer
124 views
0
votes
2answers
594 views

Defining a function in terms of matrix elements

Currently trying to use elements from a matrix in defining a function however having some trouble. This is a somewhat simplified version of the problem. Say I have the matrix ...
0
votes
1answer
108 views

Solving NLODE with substitution

I am trying to get a solution to a non-linear ODE, below is the code that works for my problem. ...
0
votes
1answer
85 views

Evaluate outer function first

I'm new in Mathematica so this is maybe super easy to do, but I can't figure out how. I've got a function plus[a,b] that sums two numbers and I need to implement a ...
0
votes
1answer
128 views

Order of evaluation in nested expression

I am trying to make a function that works as follows: Integrate 1 for all t in the interval $ [0,1] $ such that the first element of function vstar is positive. ...
0
votes
1answer
139 views

Understanding output of multivariable integration

I'm new to Mathematica and I'm trying to integrate this function: ...
0
votes
1answer
331 views

Pull Constants outside of integrals

I would like Mathematica to pull constants outside of an integral: e.g., $\int_0^t f[t] g[s] dt \to g[s] \int_0^t f[t] dt$ This has previously been discussed at replacement rule to pull independent ...
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 ...
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. ...
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
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 ...
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
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 ...
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 ...
0
votes
0answers
71 views

Trying to Simplify an Expression

I'm trying to simplify an expression: ...
0
votes
0answers
44 views

Order of evaluation when using Solve and Minimize

I have to solve numerically an integral, that ends up being more or less as follows: Solve[f[x]==a*Sum[Sin[x-i]*(f[i]-f[i-1]),{i,1,x}],f[x]] (not actual ...
0
votes
0answers
52 views

Evaluating Expectation [duplicate]

I would like to have a result equal to a function : ...
0
votes
0answers
31 views

reloading previously evaluated inputs? [duplicate]

How do I avoid having to resend previously evaluated commands when I reopen my notebook? can't it just allow me continue my computation from where I stopped? Also, some inputs take forever to execute, ...
0
votes
0answers
26 views

Expanding Function Based on Congruence Classes

I'm trying to get Mathematica to expand $\quad \quad \beta_n=\sum_{r=0}^{n}\frac{\alpha_r}{(q^4;q^4)_{n-r}(q^4;q^4)_{n+r}},$ where $\alpha_r$ is an integer valued sequence that is given by ...
0
votes
0answers
74 views

Mathematica not evaluating q derivative of Jacobi theta function

Jacobi theta functions, $\theta_a(u,q)$ for $a=1,2,3,4$ are defined in the unit disk $|q|<1$. For some reason that I would like to understand, Mathematica does not evaluate numerically the $q$ ...
0
votes
0answers
55 views
0
votes
0answers
126 views

Mathematica not responding

I am working in the field of applied physics. Some body suggested me to use Mathematica for plotting graphs and programming. After going through some tutorials, I have written the following code but ...
0
votes
0answers
43 views

System of Nonlinear equations with Gamma and Incomplete Gamma function

The next two nonlinear equations are cumulative ratios of a production system. The mathematical model includes two essential parameters (n, tau) that can be obtained by solving this system. I'm ...
0
votes
0answers
60 views

kernel stops evaluation, clears variables

I am using the new Mathematica 10 student edition. As I am evaluating a table of integrals and calling NIntegrate repeatedly, the evaluation stops without error and the kernel clears all variables. ...
0
votes
0answers
47 views

Evaluation inside Compile

here's a simple question: I have a function: ...
0
votes
0answers
31 views

Expressions to functions, and evaluation [duplicate]

When calculating derivatives a expression is the result: in:= f[x_,y_]:= 1 + 2 x + 3 x^2 y + 4 x y^2 in:= D[f[x,y],x] out= 2 + 6 x y + 4 y^2 how do i make this ...
0
votes
0answers
49 views

Scoping problem with Manipulate [duplicate]

Consider the following simple code: f = Sin[a x]; Manipulate[ Plot[f, {x, 0, 10}], {a, 0, 10}] Manipulate takes f to be ...
0
votes
1answer
62 views

Optimizing repeated function calls

Easiest way to keep my library nice, is to naively call some functions many times with same parameters. Doing so prevents from zoo of (library-)global variables and complicated initialisation ...
0
votes
0answers
57 views

Numeric function not fully evaluating

I'm running into an issue where it seems Mathematica is not fully evaluating the output of my function h[t_]. I included the definition of phi[t_] just to demonstrate that it is a numerically defined ...
0
votes
0answers
31 views

RandomReal behavior in Block environment [duplicate]

I ran into an unexpected behavior of RandomReal function inside the Block environment. If I simplify my problem: I wanted to use two random local variables, such that the second one would be less that ...
0
votes
0answers
39 views

Notification when evaluation completes [duplicate]

I thought it would be fun to see a list of ways to have Mathematica notify you when a long evaluation completes. There are a few posts up already that address specific methods, given below, but not ...
0
votes
0answers
37 views

Number precision in a list [duplicate]

I have list with elements: ...
0
votes
0answers
98 views

How to modify the file “KeyEventTranslations.tr” to use Enter to evaluate the current cell? [duplicate]

I asked the following question before, but I do not think it has been fully answered. By default, we use Shift+Enter to evaluate the current cell, and use Enter to get a new line. Is there a way ...
0
votes
0answers
38 views

Faster evaluation of an expression for brute force optimization [duplicate]

I'm trying to bruteforce an optimization problem and I want to generate roughly a million function evaluations. I was wondering what would be the best for me to do in terms of having the expressions ...
0
votes
1answer
355 views

Pass unevaluated function with evaluated arguments

I am almost sure that this question has been asked somewhere. I found similar ones, but I cannot find exactly what I need, which might mean that I am on the wrong track. I search a method to pass an ...
0
votes
0answers
15 views

Evaluating a String that is a Variable [duplicate]

I have a Variable assigned a value, say ImportantDocuments=1 How do I make N["ImportantDocuments"] evaluate to be 1 instead of ImportantDocuments I found that ...