100k views

### What are the most common pitfalls awaiting new users?

As you may already know, Mathematica is a wonderful piece of software. However, it has a few characteristics that tend to confuse new (and sometimes not-so-new) users. That can be clearly seen from ...
131 views

### What is the point of tagset /:? [duplicate]

I'm teaching myself Mathematica and came across tagset. So I followed the example in the link, but seem to be missing the point. All of the below give me the same answer after assignment: that ...
76 views

### How does Wolfram Language implement for enabling symbols to receive various forms of parameters? [duplicate]

How does the official implement a list/tuple of parameters that can be different in type and quantity as a whole? After re-read @Szabolcs's and @MichaelE2's comments. Finally, I accepted the ...
57 views

### Understanding TagSetDelayed

I was reading What is the distinction between DownValues, UpValues, SubValues, and OwnValues? and I started to be confused with the part "Upvalues" of the first answer. Some of my confusion comes ...
63 views

### What is exactly an element a[i] in mathematica? [duplicate]

I'm confused about the logic behind mathematica programming. We can have function that will be called doing $f[x]$, thus the element $f[x]$ can be seen as the return value of a function taking an ...
161 views

### Scope of dummy variables used in defining a function

I define a function and then define another function, using the same name for the dummy variables as I used for the first function. Will Mathematica use the first definition in the second definition? ...
211 views

### What makes a pattern more general?

This is a rewording of the question. The original post is below. How come that a pattern for an expression with a specific head is not more specific than a pattern for an expression with a generic ...
178 views

### Get imaginary part of symbolic expression [duplicate]

I define ψ1 = Sqrt[Subscript[ρ, 1][t]] E^(I Subscript[θ, 1][t]); ψ2 = Sqrt[Subscript[ρ, 2][t]] E^(I Subscript[θ, 2][t]); and ...
46 views

### Multiple Square Bracketed Function definition

I am familiar with the typical way of defining a function--such as f[x_,y_]:=x+y but I have not found a discussion of definitions such as ...
1k views

749 views

### Compute the half width and full width at half maximum (HWHM / FWHM) of a mathematical expression

I have managed to compute the half width at half maximum (HWHM) and full width at half maximum (FWHM) of a sinc function through the code below. ...
63 views

### How to recall set variables in simple Product[] and Sum[] functions?

I'm new to Mathematica but have been trying to write a code that will define new variables based off of variables preset by a user. I'm allowing them to define a variable ...
147 views

### table parametric plot ode

I have a series of ODEs I'd like to plot (a double pendulum specifically) Where I'm comparing my own "handwritten" ODE to that of System modelers solutions. This is mostly an exercise to ensure the ...
812 views

### Finding Anagrams of given length from DictionaryLookup

What I'm trying to find are the 4 letter words in the Mathematica dictionary that have the most anagrams and the amount of anagrams these have each. But I can't seem to find all the 4 letter words in ...
319 views

### Why is the first argument of the SetDelayed evaluated?

In[1]: f=g; In[2]: SetDelayed[f[x_],x^2]; In[3]: ?f Globalf f=g In[4]: ?g Globalg g[x_]:=x^2 However, SetDelayed has the ...
205 views

### WL terminology: evaluate, call, invoke, use, etc

A WL (Mma) program is a sequence of expressions to be evaluated, which generally involves applying commands and functions to actual arguments. What is the accepted terminology for what I think of as ...
366 views

### Plot 3D doesn't show anything

Good Evening, I defined a function which is composed of other several functions. Mathematica compiles well but I can't get a plot and I do not understand way. Can anyone help me with the code and ...
258 views

### Define scalar quantity that squares to 1?

My equations contain different cases which differ only by some signs. So in order to work with all cases simultaneously, I introduce a placeholder for a sign: s[x] ...
124 views

### Why doesn't CloudDeploy work in my desktop

I have difficulty in making CloudDeploy in my desktop. Does anyone know why ? Thanks Here is what I see: Here is the code if someone would like to test ...
153 views

### How to map a function over a dimension in a matrix? [closed]

I have a function g[x,r] yielding a 3x1 vector, where x is a ...
117 views

### Custom opaque operator with custom axioms?

Is there any way to define a custom opaque operator/function in Mathematica that satisfies custom axioms, so that the Mathematica engine can perform simplifications using those axioms? For example, ...
116 views

### How to define a function whose argument is in the replace list?

As a simplified example: In[780]:= f[x_] := a /. {a -> x}; f[1] Out[781]= 1 This yields the correct result. But ...
257 views

### Apply ToString to a list of variables [duplicate]

I have data1 = {1, 1}; data2 = {2, 2}; datalist = {data1, data2}; I want to create a string list based on the variable names inside ...
2k views

### How do you set attributes on SubValues?

SubValues, as discussed in a previous question, are declared as follows ...
1k views

### Difference between variables and functions

Forgive me if this question is very basic; I've learned Mathematica mostly by example. In most programming languages, there is a clear distinction between variables and functions: variables hold ...
222 views

### I want to compute the derivative of Black and Scholes option

Good evening to everybody, my question is about computing the derivative of a Black and Scholes option and to draw it. My code is ...
39 views

...
88 views

### Does Mathematica have a method for achieving the same goals that Aspect Oriented Programming does?

I imagine that this question has been asked before, yet I'm not able to find an answer using the form of the question I believe might be asked. Is there a mechanism for duplicating the ...
2k views

### Defining an integer-valued function on an integer domain

This should be an easy question! I want to define a function with domain = the 12 integers {1,12}, with the values f[1]=31, <...
57 views

### How to erase definition introduced by using Set instead of Equal in Solve [duplicate]

When trying to solve a set of equations, I made a mistake by using = instead of ==. Now when I fixed the mistake, the equation ...
857 views

### Generating assignments and transforming code inside held forms when generating code

I have been playing with slightly above trivial code manipulations in Mathematica. I thought Mathematica would be great for this kind of work because of rule replacement and expression manipulation, ...
7k views

### Nested If statements

When I do this: Apply[(If[#2 == what, "yay", If[#2 == whoops, "nay"]]) &, {-5, what}] I get: yay But when I do this: <...
470 views

### NDSolve memory usage [closed]

I am trying to solve numerically a system of linear ODEs with some quickly varying driving functions. The basic command is: ...
244 views

### Syntax f[x_][y_]

Need to understand the principle of the distinction between f[x_,y_] and f[x_][y_] It seems also that z[x_, y_][a_, b_, c_][α_, β_] := a (x + y)^b + c/(α-β) ...
124 views

### Clearing Problem with DSolve [duplicate]

Consider: This is a classic mistake (using a single equal sign) that has been discussed on Mathematica Stack Exchange before. I know that Clear[Derivative] will cure the problem. However, consider ...
65 views

### How to use the symbols in SystemPrivate? [duplicate]

Looking at Names["SystemPrivate*"] gives: I'd really like to use and look at the code for some of these symbols, e.g. ...
85 views

### How can PowerExpand be made to evaluate the ArcTan form that takes two arguments?

Consider c = Cos[phi]; s = Sin[phi]; ArcTan[c, s] // PowerExpand ArcTan[s/c] // PowerExpand which yields ...
51 views

### Creating an indexed set of functions with the indices in the function names [duplicate]

As the titles describes, I want to create a list of functions like the following, where the indices are not in the argument slots: ...
231 views

### Measuring Temp on a cubical using heat equation with Neumann and Dirichlet boundary conditions

I'm trying to solve 3D heat equation to understand how the temperature varies with time on cubical. i have mixed boundary conditions: Dirichlet on the bottom surface (constant Temp) Neumann on all the ...
110 views

### Pattern for a function of say 2 variables [closed]

How can I specify a pattern for an expression f for which say f[x,y] returns a value, ie is defined as a function taking two ...
142 views

### NDeigensystem returns error due to mesh discretization when calculating vibrations of a cantilever

There was an transcription error in the code I provided in a previous post: https://mathematica.stackexchange.com/questions/105713/ndeigensystem-returns-complex-non-hermitian-error-for-the-...
129 views

### I want to plot a list of points with specified t and x[t] coordinates [closed]

I have this code: ...