Questions tagged [simplifying-expressions]
Questions on manipulating complicated expressions and making them look simpler using Simplify, FullSimplify and Reduce.
2,507
questions
1
vote
2
answers
140
views
Mathematica struggles to solve system of trigonometric equations?
As explained here, I'm trying to solve $$-ar \cos \phi = R \cos \psi \\
r \sin \phi = R \sin \psi$$ for $R, \psi$ in terms of $r, \phi$.
I believe the correct solution is $$R = r \sqrt{a^2 \cos^2 \phi ...
2
votes
1
answer
92
views
Simplifying a factor of a factored polynomial
In the following complicated example, Mathematica fails to simplify the x-1
...
0
votes
1
answer
70
views
How can I improve this weird FullSimplify result?
I can't seem to get FullSimplify to fully simplify this complicated expression. I've added relevant Assumptions that helped, ...
2
votes
0
answers
61
views
Are there public Mathematica scripts for computing Lyapunov's first focal value for planar systems?
This seemed to me a utility which must have been created already hundreds of times, but I only found an implementation of 2022, which did not work on my example, so I needed to fix it first. Here's my ...
1
vote
1
answer
111
views
Error while using FullSimplify
I am trying to simplify a particular expression using Collect, Series, and FullSimplify:
<...
3
votes
1
answer
128
views
Summation question?
I have following summation that I want to implement using Mathematica:
...
3
votes
1
answer
103
views
How to get the function-basis as they appear in the expression?
I have the following expression containing functions eg. Log, PolyLog etc,
...
2
votes
1
answer
124
views
How to enforce a range for variable when taking a limit?
I am trying to compute the limit of the following complex expression with respect to $\lambda$. It gives me an error which I think has to do with defining the range of the variable. In my case it is ...
2
votes
2
answers
213
views
Taking the derivative of Re[f]
I have looked at similar posts, such as this one, but none of the solutions have worked for me. I have an imaginary function, and I have tried to obtain its real part using ...
2
votes
0
answers
56
views
Deriving Expressions for R1, R2, and R12 , Normalized Coincident Detection Probability, and LG Mode Formalism
I am currently reviewing a research paper on orbital angular momentum entanglement between two photons (signal and idler) generated from a pump photon via SPDC. The paper introduces the following ...
3
votes
2
answers
311
views
Better Factorization
It seems Mathematica likes to factor some things in less than optimal ways. For example, for the oscillating exponential function (F) below, is there any way to force it to reduce both the number of ...
1
vote
0
answers
118
views
How can I fully simplify sum that includes absolute value?
Consider the following sum:
...
0
votes
1
answer
62
views
How to simplify this long notebook?
I have some large calculations I want to simplify them to reduce the number of lines as well as saving time.
I have a quadratic equation based on C and I want its delta==0 and then solve it for "...
1
vote
1
answer
95
views
Rearranging a simple algebraic expression
I have a polynomial of variables $x,y$, where $|x|<1$ and $|y|<1$. When I apply the Simplify function to this expression, I get an expression of the form
$(x-...
5
votes
1
answer
120
views
Why do Resolve and ForAll fail with trigonometric expressions?
Why Resolve is not able to solve this problem? Similarly Solve and Reduce are not able to do ...
6
votes
3
answers
523
views
Sum of sinusoids at the same frequency but with different amplitudes and phases
Three sinusoids at the same frequency are superimposed:
Cos[3.1 - t] + 5 Cos[π/4 + t] + 2 Sin[0.3 + t]
How can the resulting oscillation be stated in the following ...
1
vote
0
answers
42
views
Simplify argument of Logs
I have the following expression
...
4
votes
1
answer
138
views
Strange result simplifying higher order BesselJ [duplicate]
Consider the following integral:
$$\int_0^1 Z_n^m(r)\ J_m(\rho r) r dr$$.
The solution of this should contain a single Bessel function:
$$(-1)^{(m-n)/2}\ J_{n+1} (\rho)/\rho$$ (see https://www.osti....
2
votes
0
answers
63
views
Expanding Pochammer symbols/Gamma function for simplifying expressions
TLDR: How to expand gamma functions or Pochammer symbols in an arbitrarily long product?
Some context
I am trying to find out a closed-form expression for $\langle r^\alpha\rangle$ for the non-...
0
votes
0
answers
46
views
Why can't Mathematica simplify $\left(e^{t/m}(gm)^{1/k}\right)^{-k}$? [duplicate]
It seems Mathematica can't simplify this
Simplify[(e^(t/m)*(g*m)^(1/k))^(-k)]
The result is
I think it should be
1
vote
1
answer
66
views
More intuitve way to simplify a simple expression involving two exponential factors
Is there a way to ask Mathematica to simplify expressions it generates, like:
$e^{-\frac{A t}{v^3}-\frac{v^2}{2 w^2}} \left(-1+e^{\frac{A t}{v^3}}\right)$
into a more readable form by taking out the ...
2
votes
1
answer
129
views
Using Reduce to simplify (not solve) system of equations
I'm dealing with a Mathematica program that generates a set of coupled non-linear equations involving an unknown function and its derivatives with respect to at least one independent variable. My goal ...
1
vote
3
answers
108
views
Why does assuming f[_] > 0 does not work while Element[f[_], Reals] does?
Refine works with symbols in either way:
Refine[Sqrt[x^2], Element[x, Reals]]
(* Abs[x] *)
Refine[Sqrt[x^2], x > 0]
(* x *)
...
0
votes
1
answer
74
views
PiecewiseExpand fails to address assumptions
PiecewiseExpand seems to ignore more complex assumptions. Here's an example:
...
2
votes
3
answers
86
views
How to factorize $x+y$ in this kind of example?
Consider the following simple polynomial in two variables 5 + 2x + 2y. Suppose I want to simplify it to 5+2(x+y). I have no idea ...
4
votes
5
answers
315
views
How to make ReplaceAll recognize what to be replaced in a situation like this?
I'm a bit confused on how ReplaceAll works. For example
ReplaceAll[2x+2y, x+y -> 1]
just gives ...
2
votes
2
answers
116
views
Simplify inverse of function
This would be a noob question, but I need help simplifying the inverse of an expression
...
0
votes
1
answer
41
views
How to make MMA distinguish between symbolic coefficients and variables when doing factorization? [closed]
I what to factor a polynomial with complicated symbolic coefficients
Factor[p0^2 + k^2 r^2 \[Tau]^2 - 2 k p0 r \[Tau]^2 \[Omega] + p0^2 \[Tau]^2 \[Omega]^2]
In ...
0
votes
1
answer
58
views
How to collect specific terms in an equation and set them to new parameters?
I have this equation
...
2
votes
2
answers
67
views
Long outputs manipulation
does anyone know how to get the expressions of this shortened form? when I try to use "show all" my mathematica collapses
0
votes
0
answers
38
views
Simplifying symbolic expression using replacement rules
I am trying to carry out a linear stability analysis of a two PDE system. I start by defining the equations and then define the perturbation along with the replacement rules required. I then use a ...
4
votes
1
answer
130
views
How to force Mathematica to simplify in terms of half angles?
By basic trigonometric identities, the expression $\frac{\sinh(x)}{\sqrt{2}\sqrt{1+\cosh(x)}}$ simplifies to $\sinh(\frac{x}{2})$. But Mathematica seemingly don't perform this simplification. I tried ...
0
votes
0
answers
42
views
RuleDelayed with Simplify?
I have the Rule
yRule = y -> Function[{l,m,x},x^(l + 1) Exp[-((2 I m)/x)] Hypergeometric1F1[1 - l, -2 l, (2 I m)/x] ]
Is it possible to replace and simplify ...
1
vote
0
answers
55
views
Limit giving indeterminate result
I have a function $r_h(v)$ given by,
$$r_h (v) = \left(\frac{m_0}{2 g} e^{-g v_f} \left(-1+e^{-g(v - v_f)} \right) \right)^{1/5}$$
where $m_0$ and $g$ are just numbers. I want to take the limits of ...
2
votes
2
answers
302
views
How to simplify logical expression?
I would like to simplify
(a == c && c != 0) || (a == 0 && c == 0)
to
a == c
How can I do that?
0
votes
0
answers
64
views
Assuming Refine does not work for all If[] expression part
One simple example as following
...
0
votes
2
answers
72
views
How Not to Simplify Exponential of Log?
I have the expression
Power[x,I y]
Both $x,y$ are real. Now I want to write this expression in term of Exponential of Logarithm. The expression can be rewritten as
...
0
votes
1
answer
52
views
Evaluation gives different results before and after simplifying expression
I am trying to evaluate $h(z)=\frac{f(z)}{g(z)}$ at points $z$ close to 0. Here I have taken an example value of $z=\texttt{z1}=10^{-7}$ for demonstration. I notice that evaluating the fraction before ...
2
votes
2
answers
92
views
How to prevent evaluation without simplification?
I am trying to compute a sequence of terms, which have a form similar to $g(z)$ at different points $z$. For $z$ close to 0, I have observed that the terms are evaluated as 0/0 (indeterminate form) ...
8
votes
3
answers
3k
views
Why doesn't Mathematica recognise two integrals as equal?
The following expression
$$\int_{0}^{t} f(t_0) \,dt_0 - \int_{0}^{t} f(t_1) \,dt_1 = 0$$
is zero because it is just a change of integration variable.
Why doesn't Mathematica give zero in this case?
<...
0
votes
1
answer
61
views
Is it possible to get rid of the square root in the solutions of the following symbolic quadratic equation?
I have a quadratic equation, which I want to solve, but don't want the square root to appear within the solutions. I tried converting the discriminant into a quadratic form but failed, not sure if ...
2
votes
1
answer
166
views
Is there a built-in expression transformation which can perform this simplification?
I have an interval overlap test like this:
...
1
vote
2
answers
160
views
Converting expression to quadratic formula
I want to manipulate and represent the following expression in a more presentable way.
...
0
votes
1
answer
64
views
Simplifying to remove all imaginary numbers
I have a purely real function (spec[w], where Im[spec[w]]=0), found through
...
1
vote
0
answers
86
views
Attempt to find a solution (out of potentially many) to a system of equations with FindInstance runs forever or crashes
I have a system of equations that in principle should have a solution (I would think not a unique one), which I want to solve. I am not interested in all solutions; I just want to locate one, assuming ...
1
vote
1
answer
152
views
Simplifying expressions with directional derivative
Suppose I have a function $f(x, y)$ which is differentiable everywhere (but not explicit). When I run a code snippet like:
...
1
vote
0
answers
72
views
Strange behaviour of Simplify
MMA version 13.3
Can somebody explain the following behavior:
Here Simplify works as expected:
x1 e[1] + x2 e[1] // Simplify
(x1 + x2) e[1]
However, here ...
0
votes
1
answer
74
views
Simplifying fraction containing Abs
The original formula looks like this:
Abs[(b x0^2)/(2 a) - (a y0^2)/(2 b)]/Sqrt[x0^2 + y0^2]
How to get:
...
1
vote
2
answers
236
views
Simplifying products of DiracDelta
I want to simplify expressions containing DiracDelta products. For example I want to simplify the expression
$$\delta(z-2)\delta(k-5)\delta(t-z-k-9)$$
to give the answer
$$\delta(z-2)\delta(k-5)\delta(...
4
votes
0
answers
110
views
Is there a way to get expressions to output in terms of Log2 instead of Log? [duplicate]
I'm in computer science, pretty much every logarithm I ever encounter is base 2.
Normally, Mathematica wants to convert every logarithm to the natural log Log, so ...