Questions tagged [variable]

Questions on the use or manipulation of Mathematica variables (i.e. names associated with a changeable value). Use [variable-definitions] or [assignment] for questions on variable context localization, or assignment.

Filter by
Sorted by
Tagged with
1 vote
1 answer
93 views

Equation with 3 variables running forever [closed]

I am new to this and was trying to solve an equation. Yet, it is taking more than 6 hours, and I am unsure if I typed something wrong or if my laptop settings are incompatible with the software. Any ...
C. K's user avatar
  • 13
0 votes
1 answer
52 views

Defining a function of a variable through another intermediate variable

The following is a really simplified version of what I'm trying to do. I have a variable fn defined in terms some other variable x. I then want to define a function of x through the variable fn. ...
Rudyard's user avatar
  • 461
1 vote
1 answer
65 views

Find an instance satisfying equation

I have the following equation with two variables xi and nu. ...
Dotman's user avatar
  • 424
1 vote
2 answers
85 views

How can Mathematica merge $(1/t)^{1/3} t^{17/3}$ in an expression?

(1/t)^(1/3) t^(17/3) How to let Mathematica simplify it?
dessert's user avatar
  • 11
0 votes
0 answers
47 views

Identify a condition among variables that satisfy an inequality

I have a symbolic function that produces the output a = (1 - e - mu/n) Log[(1 - e - mu/n)/(1 - mu/n)] + (e + mu/n) Log[((e + mu/n) n)/mu] If I substitute ...
Dotman's user avatar
  • 424
0 votes
1 answer
65 views

A specific usage of "Solve" function [duplicate]

It is something from Simplifying polynomials with conditions on variables, that intend to minimize the number of variables. The problem is the usage of ``Solve". I know how to solve equations, ...
InFei's user avatar
  • 115
0 votes
0 answers
49 views

how to use subscripted variable such as a_i as the control of Manipulate?

I'd like to define a series of variables called $l_1$,$l_2$, etc., in Mathematica, using the "ctrl+_" shortcut. Moreover, I want to use these variables as the controls of a Manipulate[] ...
larry's user avatar
  • 715
1 vote
1 answer
104 views

How can I define a function with a variable with subscript?

I want to define a function in Mathematica: $$h(\tau_x)=\tau_x$$ $\tau_x$ has no special meaning. To be honest, it's totally OK if I use the function $h(x)=x$ to replace $h(\tau_x)=\tau_x$. It doesn't ...
Xiangyu Cui's user avatar
1 vote
2 answers
97 views

Generate family of linear inequalities from vector variable for use in `FindInstance`

Suppose that I have a vector variable xvec = Array[x, 10]. How do I generate the family of linear inequalities $$F = \{ {x\in\mathbb{R}^{10}:x_1\geq x_2,\ldots,x_9\...
rrrrr's user avatar
  • 125
0 votes
1 answer
28 views

sum elements (variables) of a vector variable [closed]

I would like to sum elements of a vector variable, e.g., Is xvec = Array[x, 10] s24 = Sum[xvec[i], {i, 2, 4}] where $s_{24}:=\sum_{i=2}^4 x_i$. However, I am ...
rrrrr's user avatar
  • 125
0 votes
0 answers
39 views

Invalid Variable Error for Solve When Using Law of Cosines

I'm making a shadow simulator, and am using the Law of Cosines to calculate a certain angle in a triangle with two known widths and one known angle. I'm using Solve ...
LonelySpaceman's user avatar
2 votes
1 answer
69 views

Problem with integration with indexed variable

I wonder why I can not have a correct integration form on Mathematica with some indexed variables. Indeed, when I write : ...
Nathan Gege's user avatar
0 votes
3 answers
117 views

Conflicting variables

So, I read a set of variables and respective values from a file and store them in a variable specs = {{"Type", "KP", "fp"}, {"LP1", 2, 2000}, {"Type", ...
Granger Obliviate's user avatar
2 votes
5 answers
276 views

Repeating definitons of variables

I have the piece of definitions y = 1; x = 2; n = 2; a := (y^(x - 1) + n)/(y^(x - 1) + y^(x - 2)) I want to keep defining y as a by doing: ...
CAN GÜLLÜ's user avatar
0 votes
0 answers
65 views

Answer changes slightly when re-run

I am trying to resolve why I get slightly different answers when I re-run my notebook. Here is my full code: ...
LTB's user avatar
  • 1
1 vote
3 answers
81 views

Local variables in a module don't show their actual values

I need to do the following transformation that pick[a,b] -> ex[c|->{c[a],c[b]}] ex is a function that accepts a function as parameter which returns a list ...
Gqqnbig's user avatar
  • 307
7 votes
1 answer
218 views

How to Obtain Complete List of Properties

I am working with Matrix Market matrices in Mathematica (specifically GEMAT12), and I saw from other posts that you call properties of a variable exemplified below: ...
Chloe's user avatar
  • 145
0 votes
0 answers
71 views

Can you dynamically create variable names in Mathematica? [duplicate]

I was wondering if there is a way of Mathematica to read a string or number and create variable with that name. For instance imagine that I have a file with the word data1. I would want to create a ...
Granger Obliviate's user avatar
2 votes
0 answers
72 views

how to understand the locality of variables in Mathematica

(in the first i should say may be the title is not very accurate) how to understand case like the following: ...
Aerterliusi's user avatar
2 votes
0 answers
69 views

a basic question about variable in Mathematica

I can't describe exactly the problem I'm experiencing, but this kind of problem has a remarkable feature, that is, commands which couldn't work in the before can be executed correctly when i turn off ...
Aerterliusi's user avatar
3 votes
1 answer
278 views

Does Mathematica have that function which returns the variables back [duplicate]

Does Mathematica have this function where I can give a system of equations as an input and the function return back to me the variables which were included in that system. For example: input Function[...
Math View's user avatar
3 votes
1 answer
207 views

How to use <* *> in tex to substitute mathematica variables [closed]

I am generating tex files with a "for" loop in Mathematica. In each file I need to have different quantities. So I am defining a variable in Mathematica, which is is evaluated during each ...
Stoyan Apostolov's user avatar
1 vote
0 answers
83 views

Internal variable in Sum inside a function [closed]

I am writing a simple function which performs a sum, but run into an unexpected answer. ...
Lelouch's user avatar
  • 523
3 votes
4 answers
462 views

Define a delayed function depending on a global variable as though the variable's contents was pasted

Problem Say I previously defined a variable (maybe through some extensive calculation) thing = (a+x)y Then, I want to use that expression elsewhere. In general, I ...
ions me's user avatar
  • 881
5 votes
1 answer
217 views

Is it necessary to use Print inside a Block? [closed]

If I use a Block with variables already used and ask it to Solve an equation inside the Block...
RoberRM's user avatar
  • 319
0 votes
0 answers
21 views

Replacing System` definitions in a context whilst still maintaing acces to them [duplicate]

Given the system operator TensorContract I can define a new one, TensorContractLazy with the attribute ...
user3257842's user avatar
0 votes
0 answers
50 views

Reusing local variables through Reduce and ToRules

Problem: I am interested in solving a system of linear equations through Mathematica. In my current test scenario, I am having trouble using the Reduce function followed by the ToRules command. I ...
Axion004's user avatar
  • 111
1 vote
0 answers
35 views

How to best query if an expression contains Symbol/variable

Say I have this expression, among many: ...
Tempus Nomen's user avatar
1 vote
0 answers
87 views

Why =. is not clearing the value of a variable in this case? [closed]

I am reading "Mathematics and Algorithms" as part of the Wolfram Tutorial series. In "Values for symbols" section of the "Algebraic Calculations" chapter it is described ...
M.E.'s user avatar
  • 323
0 votes
1 answer
50 views

Function of two variables - how to supress one variable dependency

I have this equation i would like to solve: e0 = (2 \[Alpha]1g)/((1 - v1g) (c^2 - b^2)) Integrate[r \[Tau]1[r, t], {r, b, c}] - (2 v1)/E1 A1; Function e0 ...
U.Grammy's user avatar
0 votes
0 answers
67 views

How to define variables properly in mathematica, a variable with two name [duplicate]

I wanted to define a variable in the name "beam_frequency", this is quite possible in other programming languages like python and Matlab. How to define two pair variable name in Mathematica ...
Nanavanalla's user avatar
2 votes
2 answers
345 views

Would it be poor advice to assign roman numerals as top variables?

For example like so. x = 10; xi = 11; xv = 15; Is there an automated way to spit these numbers out maybe 1-1000.
William's user avatar
  • 7,595
2 votes
2 answers
139 views

Rewriting an expression while using another parameter

I wish to rewrite V and M with the given A. I have provided what the end result is supposed to look like. Here is V ...
user128616's user avatar
0 votes
0 answers
41 views

Scaling a variable multiplied by power series is not giving expected output

I have a power series getting multiplied by a variable, which gets scaled by the small parameter used in the power series. As an example, in the following dummy series: ...
Manpreet Singh's user avatar
2 votes
2 answers
101 views

How to plot the perimeter of an ellipse where the variable is its eccentricity?

I'm basically just trying to plot a function where the x value is the eccentricity of an ellipse and the y value its perimeter. I've tried first defining the eccentricity ...
kat's user avatar
  • 21
0 votes
1 answer
86 views

How to define prefix that can turn numeric?

I put these prefix in my init.m file. First I Unprotect all these symbols, set values and then ...
hana's user avatar
  • 2,308
1 vote
1 answer
173 views

Solving for linear combination of variables

I have a set of constraints on nine variables, ...
Dotman's user avatar
  • 424
5 votes
5 answers
915 views

List of letters longer than the alphabet

I would like to create a list of the first $n$ letters of the english alphabet. Importantly, I would like that in case $n$ is bigger than the size of the alphabet, the letters will start repeating in ...
Federico Carta's user avatar
0 votes
1 answer
227 views

How to convert mathematica root expression to readable one? [duplicate]

I am trying to find out at what regions a function is monotonically decreasing. The function is a function of X and has two more variables epsilon and B with the constrains 0 < B, 0 <epsilon< ...
TTT's user avatar
  • 57
0 votes
0 answers
82 views

Cannot Optimize where NSolve and NDSolveValue are involved with Multi-Variables

My Objective Function is Sqrt[Sum[((sol[[j]])^2), {j, 1, noofnode}]/noofnode] with variables v1, v2, v3, v4, v5, v6. But just ...
Sazedur Rahman's user avatar
1 vote
1 answer
135 views

How to change the values of a parameter within the domain in NDSolveValue?

In the following code, e is constant within the domain. But I want to change the value of e continuously within the domain. For ...
Sazedur Rahman's user avatar
0 votes
0 answers
138 views

How to Optimize a Finite Element Model with Multiple Variables in Mathematica?

Urgent Help, Please !!! I am attaching my codes for a Finite Element Model which needs to be optimized and the Objective Function ("of" in the code) has been mentioned at the last line of ...
Sazedur Rahman's user avatar
0 votes
0 answers
545 views

Help with Error: Recursion depth of 1024 exceeded during evaluation

I am quite new to Mathematica. Please excuse my mistakes. I would appreciate if you could help me with the following set of commands. ...
grkcn's user avatar
  • 1
0 votes
0 answers
43 views

how to delete a variable programmatically in a notebook from another notebook

how to delete a variable programmatically in a notebook from another notebook? c = b; I have already tried Remove[c] but ...
Mohammad Shahbazi's user avatar
2 votes
1 answer
59 views

Arrange an expression based on variables' names

I have a problem of arranging an expression as shown in the following picture. The first expression exp is derived from other functions and equations. I want to get ...
likehust's user avatar
  • 693
3 votes
1 answer
146 views

Partial derivatives in a variable name

I would like to create variable with names of the form \[PartialD]g and \[PartialD]\[PartialD]g. Is there any way to do this?
Jonathan Shock's user avatar
1 vote
0 answers
89 views

Full Information Maximum Likelihood - Under some other name in Mathematica

I have recently stumbled upon something called FIML - Full Information Maximum Likelihood. Apparently this methodology helps overcome missing variables provided the gaps are random. Searching the ...
Rogo's user avatar
  • 830
5 votes
1 answer
153 views

What Does this Syntax Mean in Ouput from DSolve?

When I run the code DSolve[y*D[f[x, y, z], z] - z*D[f[x, y, z], y] == 0, f[x, y, z], {x, y, z}] I get the following output. I don't understand this syntax. I ...
Just Some Old Man's user avatar
0 votes
2 answers
79 views

Integrate of simple equation but is not solving!

I have this simple integral but I don't know why Mathematica can't solve it?! FullSimplify[Integrate[x/(-x^2 + a x + b)^(1/2), {x, Sqrt[b], Sqrt[R^2 + b]},Assumptions -> {a > 0, b > 0}]]
Mathecis's user avatar
  • 153
3 votes
2 answers
183 views

Making a list of variables

Consider the following code, which give a Manipulate object that returns the "total" of a certain variable var 1 ...
sam wolfe's user avatar
  • 4,531

1
2 3 4 5
7