Questions tagged [expression-manipulation]

How to manipulate expressions structurally, not necessarily complying with the rules of algebra.

Filter by
Sorted by
Tagged with
0
votes
0answers
53 views

Manipulation of expression

Let ss2 = (γ + ν)/β; is2 = ((γ + ν)/β) (β/((γ + ν)) - 1); I wish to do the following computation but want to keep the output in terms of ss2 and is2: ...
10
votes
5answers
849 views

Simplify radical expression (a + b - Sqrt[a^2 - b^2])/Sqrt[a + b]

I have the following expansions: $\frac{a+b-\sqrt{a^2-b^2}}{\sqrt{a+b}}$ and $a>b>0$ Obviously we can simplify it further by hand $\sqrt{a+b}-\sqrt{a-b}$, but Mathematica doesn't know how to ...
0
votes
0answers
49 views

Block Behavior, but for Function Assignment instead of Variable Assignment

We can define a function using a variable b that does not appear as an argument, and then using Block, change the output of the ...
0
votes
3answers
52 views

How i can move the slider Below X axis and beside Y axis of plot? [closed]

I want to place this slider below the x-axis and Vertically beside the y-axis.
2
votes
2answers
68 views

Cutting of terms on denominators of giant expression

I have an immense expression of the form $$ \sum_i \frac{f_i(X,Y,x,y)}{(a_iX^2+b_iY^2+c_ix^2+d_iy^2)(e_iX^2+g_iY^2+h_ix^2+k_iy^2)}, $$ where at $a_i$ or $b_i$ AND $e_i$ or $g_i$ is different from zero....
0
votes
0answers
45 views

Can I specify which terms to show on the left side and which on the right side of an equality in output?

Mathematica unexpectedly moves a part of the result of the calculation to the left side where I want to display only the unknown variable. Can I prevent this?
1
vote
1answer
50 views

Grouping together same exponent terms in a multivariate monomial

This is a rather simple question but for some reason, I am spending too much time on this. Suppose I have a monomial in 4 variables, each raised to some linear combination of 3 exponent variables: <...
2
votes
2answers
59 views

Make Mathematica not to evaluate an integral?

I want the output to contain an integral, while everything under the integral sign evaluated. How can I prevent the system from evaluating the integral?
0
votes
0answers
40 views

Input output in Wolfram Cloud

This is a starter query. I know if I enter 2+2 and press enter, I get 4. Similarly, I enter ...
3
votes
1answer
198 views

Manipulating an equation to isolate a term (not solve for a variable)

Consider the following minimal example of my problem: eq = (a^2 + a == b^2) I would like to manipulate this equation to achieve: ...
0
votes
0answers
57 views

Evaluate a function with 3 different variables for the whole list of each variable

I have a function with 3 variables f[t1,t2,t3] Each function has a list of values ...
1
vote
1answer
53 views

Decompose expression into specified form of partial fractions

In order to obtain the partial fractions of an expression, I used the function Apart to realize it. However the result is shown as Figure 1 which isn't what I want. ...
2
votes
2answers
65 views

Formal substitution of exponential factors in an expression

Assume that we have some complex algebraic expression, like Exp[(a t + b s)/w] ( t Exp[ q t] w + q Exp[q s] Exp[-2 s] + a^2 Exp[3 s] + s t + 1 ) Now, this is just ...
3
votes
1answer
75 views

Pattern matching problems involving FullForm and Plus and Times

I am trying to match an expression that will be a sum of more than one terms, with the last one being a product. For example, the objecta+b+x*y. I am using the ...
0
votes
0answers
29 views

Issues in expanding expressions with formal sums

I have a very long expression involving formal sums to infinity, unfixed functions and several variables. In this very long expression, I need a typical term, like $\frac{6 A \sigma \sum _{n=0}^{\...
0
votes
0answers
24 views

How to rearrange terms in an expression to a particular form (e.g. A/w-> A*(1/w)

I have a huge expression for which the numerators are a big mess, involving numbers, variables, formal sums and unevaluted function, let's call the numerators Ai, with i=1,2,...n This "beast"...
0
votes
3answers
94 views

How to extract a factor from equation and rearrange the equation?

I want to extract a factor from the equations, it's not a common factor, just a factor defined by myself, like this: (ac+b) --> c(a+b/c) I have tried Factor,<...
7
votes
1answer
126 views

Applying Operators inside complex expressions to argument with Through

I am developing some functions to help me work with Quantum Mechanics Momentum Operators. Here, for simplicity, I represent them with these simple functions because the actions of the operators ...
0
votes
2answers
51 views

Approximating giant polynomial expression

Suppose I have a giant polynomial expression analogous to $$ F=a_1xX^6+a_2x^2X^5+a_3x^3X^4+a_4x^4X^3+a_5x^5X^2+a_6x^6X $$ and it is true that $X \gg x$. Let it be enough for me to approximate this ...
1
vote
2answers
56 views

Converting a vector of expressions into functions with the index being an input

I am trying to generate a list of functions from a vector of expressions. I have the list $H=[1,x,x^2+1,3x^3+2x,4x^2+2x]$ and I want to define a function $f$ using two inputs such that $f(n,x)$ ...
1
vote
2answers
61 views

How to delete certain terms in a polynomial with variables in subscript?

I have a polynomial in the following style, ...
1
vote
1answer
56 views

Display function definition when function has list argument

[MMA 11.0.1] I have defined various activation functions, and plotted them using a little helper to put the equation into the plot ...
0
votes
0answers
29 views

Force Mathematica to take real values of cube roots in expressions when simplifying [duplicate]

I am dealing with an algebraic mess of variables for a project and for some reason, even though the function is real, Mathematica had been spitting out imaginary values to me. This issue has been ...
0
votes
0answers
59 views

Exponential matrix, run during infinit amount of time

Context: I want to apply an exponential matrix on a vector. The size of the matrix (which then I apply the MatrixExp on) is size of 50x50, and not diagonal. For reason I don't know, Mathematica take a ...
5
votes
1answer
103 views

Extracting n-th part of an expression without any evaluation

Is it possible to extract n-th part of an expression as a string, without any evaluation? For example, ...
1
vote
0answers
31 views

Rearranging an expression for floating point accuracy?

Does Mathematica have the feature of rearranging an expression with the goal of minimizing floating point accuracy errors? I'm asking this because I have some long expressions that really suffer when ...
0
votes
1answer
42 views

How to filter out "relevant" information from expression

I have an expression of the form op = a3 b2 c1 d0 - a2 b3 c1 d0 - a3 b1 c2 d0 + a1 b3 c2 d0 + a2 b1 c3 d0 +... that is, each term is of the form $a_i b_jc_kd_l$, ...
1
vote
2answers
35 views

How do I integrate the result of a DSolve operation?

I've got the following result from evaluating a DSolve problem: ...
2
votes
2answers
153 views

I want to turn an equality statement into a function

I've got a statement (condition?) that I want to integrate. r'[t] == (2*(c + A*t)*(1 + z))/(2 + z) What's the best way to integrate just the RHS of this equality? ...
2
votes
2answers
107 views

Map a function at one "part" of each term in a multivariate polynomial

I have polynomials in several variables x[i] and y[j], and I am using First@SymmetricReduce@ ...
1
vote
0answers
66 views

Unpacking list of arguments into parameters

I have a list in the following form: list = {{a,1,3},{b,1,3},{c,1,3}} Now I want to apply this list as parameters for the Sum function so that I end up with the ...
0
votes
0answers
47 views

How can I use a replacement rule as part of a simplification?

I am using Mathematica to symbolically calculate the likelihood for a simple linear regression model. As part of this I want to substitute ...
1
vote
1answer
40 views

How to change numbers in variables defined with a loop?

I am trying to change the number which is part of the variable name with a loop. What I want to changue is the following: ...
1
vote
1answer
61 views

Writing mathematical expression in a file

I am trying to write a mathematical expression as variable = expression in the output file. The current method that I am doing is through ...
3
votes
1answer
46 views

Rationalizing only specific terms in an expression

How can I change an expression like A = (-1. a)/(x + y) - (2.1 b)/(x + y) + 4.1 + 2. x + (3. r s)/(x + y) so that -1. a becomes ...
4
votes
2answers
1k views

Write x^3 as x*x*x

I use mathematica compute functions I need for some external coding. However I can't use terms like x^2+y^3 since my programming language needs this term written as ...
0
votes
2answers
53 views

Replace small expressions in larger expressions?

How can I replace small expressions in larger expressions? Simple example Replace[a^2 + b^2 + 2*a*b + x, (a + b)^2 -> c] I want to get ...
2
votes
1answer
38 views

Passing an expression to the Plot Function does not Work

Solving a differential equation I found that its solution was analytic, and I stored it as an expression from the default rule output of the DSolve[] function: <...
6
votes
1answer
75 views

Compile - Optimization of function calls - does it matter?

I was surprised to see that, in the results of CompilePrint for a function made with Compile, calls to ...
1
vote
1answer
80 views

Exploring curl of a gradient of a scalar function

Suppose I want to explore $\nabla \times \nabla V$ where $V$ is some scalar function. It basically results in a zero. But I would only know why if I solve it on paper. I wanted to use Mathematica for ...
1
vote
2answers
64 views

Collect terms in inverse powers of three variables

I have the following expression ...
0
votes
0answers
41 views

Simplify the coefficient of an expression after calling Collect

I have an expression for which I have run Collect to get the expression in terms of a few variables. I now want to run Collect ...
-1
votes
1answer
64 views

Combining multiple graphs in one photo without consulting external programs [closed]

I want to add many plots from Mathematica into one picture and export as a PDF. Usually I select the plot and copy it as an image to Word, however the image reduces the accuracy of some plots. How can ...
1
vote
0answers
44 views

Reading product of same ByteArrays

I am handling a huge set of data and I am trying to optimize my code. I have very large expressions to expand and simplify and I've seen that converting the expressions to ByteArrays improves a lot ...
4
votes
1answer
93 views

Force results to be displayed in a way often seen in traditional math [closed]

I want to get my output in the form that I would write by hand. I have tried with TraditionalForm, but it did not work. I've looked at several answers in this SE ...
2
votes
1answer
369 views

Desktop vs. Cloud option, home plan vs. basic plan: syntax differences

I do not understand why the following simple expression is accepted using a browser (cloud option), but is not accepted using the installed software (desktop option) with the plan basic of Wolfram ...
0
votes
1answer
51 views

Find n-th derivative of the function, display it and then evaluate it at a point of choice

What would be the correct syntax to find the order derivative "$n$" in MMA, and to be able to evaluate it in a certain point. We ask for an example ; Find the order derivative 2 and evaluate ...
0
votes
1answer
85 views

Mathematica refuses to distribute a scalar through parentheses

I’m working on a problem involving Kelvin-Helmholtz instability and I’m trying to perform the linearization on Mathematica. For some reason when I get to my first order equation (ε × stuff + O(ε²) == ...
1
vote
0answers
28 views

Distinguishing function calls from multiplication when importing LaTeX via ToExpression and TeXForm

I'm trying to parse a LaTeX representation of a Desmos calculator (like this one) via Mathematica. Desmos exposes a JSON representation of its calculators, including a LaTeX representation of ...
1
vote
0answers
197 views

What is the difference between NSolve and N[Solve] [closed]

N[Solve] NSolve I am getting different results everytime I use these commands.

1
2 3 4 5
14