116 views

### Subscripted variables give errors in Module expression [duplicate]

I have following problem. I want the R not to calculate before the integration but substitute later as a function of z. My Mathematica codes look like: Codes like big, (sorry) but most of them ...
382 views

### Module: local variable specification error [duplicate]

I am developing a module which does some vector algebra, and I have added an image of the code in the link below. (I did not find a good way to add formatted code in this pane). If the image ...
134 views

### How to define an auxiliary function within a function [duplicate]

I would like to define a function within a function to serve as an auxiliary function. In essence, something like this: f[x_,y_]:=Module[{g[z_]:=2z},x+g[y]] ...
72 views

### Function definition with sub (super) cripted variables [duplicate]

I like using subscripts a lot. However, it is regrettably not possible to do, for example: myfunction[Subscript[x,1]_] := Subscript[x,1] +1 where instead of the ...
109k 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 ...
15k views

### What are the use cases for different scoping constructs?

Mathematica includes three functions that I know of which can be used to effectively (if not actually) define a variable and give it a value within a local scope: ...
919 views

### What does InternalInheritedBlock do?

What does the function InternalInheritedBlock do? How is it different from the regular Block?
696 views

### What is the purpose of InternalLocalizedBlock?

I have come across the (internal) use of the function: InternalLocalizedBlock I am trying to determine its purpose. It seem to behave like ...
9k views

### Module with “local functions”

I am trying to use a Module having "local functions", i.e., those which I need to define only inside this module. So I tried this: ...
4k views

### bar and hat only apply to certain letters

(I'm navigated from stackoverflow.com where I asked almost the same question) I'm a beginner in Mathematica. Like shown in the image below, I'm trying to put hat ...
722 views

### Plotting 2-D Electron Density Carbon Atoms

I need to create a 2-D electron energy density plot in Mathematica to compare with my STM experimental results in my lab class. This would be done by plotting the sum of the symmetric and anti-...
511 views

### 3D plot of multiple functions

I am just starting to learn Mathematica. I defined two functions Subscript[x, 1][t_, α_] :=1/2 (3 - 2 E^-t + E^t (2 + t) (-1 + α) - α) And ...
725 views

### How to implement the for loop to replace text strings or texts?

I wonder define a bunch variables named like $X_1$, $X_2$, $...$, $X_n$. Is there some smart way to declare them instead of by pure typing. One trick I can image is to use the for loop,...