141 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 ...
78 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 ...
65 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 ...
179 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? ...
212 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 ...
191 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 ...
62 views

### How do we input powers of indexed variables?

I have tried (a[i])^2 and alternatively (a^2)[i] Apparently both seem to work, but I was wondering what was the right way ...
268 views

### How do I get Mathematica to recognize this simplification? (ReplaceAll pattern rule)

I want Mathematica to understand this $$(\sum_{k=0}^n a_k)(\sum_{j=0}^n b_j) = (\sum_{k=0}^n \sum_{j=0}^n a_k b_j)$$ I have tried this ...
863 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. ...
315 views

### VectorPlot3D of the Electric Field E as Determined from the Potential V

I am new to Mathematica and I am trying to create the electric field $F$ from the electric potential $V$ (using arbitrary distances) and then plot the subsequent vector graph to show that the electric ...
65 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 ...
150 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 ...
211 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 ...
400 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 ...
262 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] ...
127 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 ...
178 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 ...
118 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, ...
121 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 ...
272 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 ...
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 ...
39 views

...
91 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 ...
254 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/(α-β) ...
131 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. ...
86 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 ...
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 ...
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: ...
237 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 ...
112 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 ...
143 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-...
230 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 ...
130 views

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

I have this code: ...
487 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: ...
1k views

### Solve a nonlinear PDE equation with a Neumann boundary condition

I am trying to use Mathematica 10 to solve a PDE $$u_t=u_{xx}+u_{yy}+u(1-u),$$ in the unit disk $(x,y) \in D=\{(x,y):x^2+y^2<1\}$, with the Neumann boundary condtion \frac{\partial u}{\partial n}...
872 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, ...
135 views

### Solving a set of trigonometric equations [closed]

I've been trying to solve the following equations in order to plot Subscript[θ, 41] with respect to Subscript[θ, 2] from 0 to ...
123 views

### Sum of operations involving an arbitrary number of 2D vectors

I need to define an equation stating that the sum of n operations involving n 2D vectors and ...
277 views

### Iteration of functions

I'm trying to define a function f, such that f[a_]:=a; f[f[a__]]:=f[a]; Then, I tried to evaluate f[x,y]. Since ...
327 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 ...
60 views

### What makes items with head Function different?

I apologize beforehand for the muddleheadedness of this question. It reflects the fact that I'm trying to interpret outward "behaviors" of Mathematica expressions without having any understanding of ...
390 views

### Create a function with Dt[x] as a variable

I have a function (for example F[x_]:=Cos[x]). I want to define a function like Fdot[x_,xdot_]:=Dt[F[x]] where xdot represents Dt[x]. For example, to define Fdot one might naivley try Fdot[x_,Dt[...
643 views

### Assignments in ParallelDo when using indexed variables

For convenience I use an indexed variables syntax to hold results of long computations for different integer parameters: ...
823 views

### Partial derivative of defined function with vector input

Background: Have written a formula for the refractive index for a glass slab (n) that depends on the variables t,a and d. Now I want to calculate for example some sort of error and I'll be needing to ...
96 views

### Can we say that “all functions in Mathematica are some kind of pattern-matching-and-replacement procedures”? [duplicate]

Currently I am studying Mathematica programming, and when I study pattern matching and replacement, I find it is quite similar to functions. So can we say "all functions in Mathematica are some kind ...