Questions tagged [symbolic]
For questions about symbolic computation, as opposed to numerical computations.
1,538
questions
87
votes
6
answers
6k
views
Advice for Mathematica as Mathematician's Aid
I use Mathematica mainly as an aid in symbolic attacks on problems, usually intermediate or harder and often number theoretic. While Reduce, ...
68
votes
4
answers
20k
views
Can Mathematica do symbolic linear algebra?
For instance, is there some way I can say "let A and B be arbitrary real $m\times n$ and $k\times m$ matrices, Simplify[Transpose[Transpose[A].Transpose[B]]]" and ...
66
votes
2
answers
7k
views
Analogue for Maple's dchange - change of variables in differential expressions
Update
Finally in v13.1 the function DSolveChangeVariables is introduced, try it out! DChange in the answer below is still a ...
53
votes
6
answers
42k
views
How to calculate scalar curvature, Ricci tensor and Christoffel symbols in Mathematica?
I am seeking a convenient and effective way to calculate such geometric quantities. I've used packages like TensoriaCalc, but they don't work at all time. Sometimes,...
53
votes
4
answers
21k
views
How do I work with Root objects?
I want to solve the trigonometric equation :
$$(3-\cos 4x )\cdot (\sin x - \cos x ) = 2.$$
I tried
Solve[(3 - Cos[4*x])*(Sin[x] - Cos[x]) == 2, x]
It returns the ...
44
votes
3
answers
4k
views
Symbolic solution(s) to generalized Heat equation
Symbolic solution(s) to Heat equation?
or more generally,(eventually) Green functions to known PDEs
I am interested in variations of the heat equation:
or more generally
or even more generally (<...
42
votes
1
answer
2k
views
How can I define a new symbolic constant like Pi?
There are a few builtin symbolic constants which behave like numbers, e.g. E, Pi, EulerGamma,...
42
votes
2
answers
1k
views
Why does Mathematica report that $\int_1^\infty\frac{\sin(\sqrt{x})}{\sqrt{x}}dx$ = $2\cos(1)$?
Bug introduced in 7.0 or earlier and fixed in 11.0
Mathematica 10 gives the following very odd result,
Integrate[Sin[Sqrt[x]]/Sqrt[x], {x, 1, ∞}]
(* 2 Cos[1] *)
...
40
votes
4
answers
2k
views
Some indefinite integrals evaluate in 11.2 but not in 11.3 - what can be done?
Bug introduced in 11.3 and fixed in 12.0.0
Reported to Wolfram: [CASE:4032137]
These integrals evaluate in version 11.2 on windows but
when I tried them under version 11.3 they returned unevaluated.,...
39
votes
1
answer
1k
views
How to augment the realm of functions Mathematica thinks it knows how to integrate symbolically
My question involves extending the functionality of Integrate over specific integrals in the most generic manner.
Specifically, is it possible to "hack into" ...
38
votes
1
answer
40k
views
Extract real part of a complex expression better than Re does
I have a complex expression with real positive variables only.
Mathematica Input Style:
...
37
votes
2
answers
904
views
$\sum_{k=1}^{\infty }\left\lfloor\frac{5}{5^k}\right\rfloor$ giving wrong answer?
Bug introduced in 7.0 or earlier and fixed in 11.0.1
When I try to evaluate the following:
$$\sum_{k=1}^{\infty }\Bigg\lfloor\frac{5}{5^k}\Bigg\rfloor$$
using
...
35
votes
4
answers
4k
views
What is a type in Wolfram Mathematica programming language?
"Everything is an expression" is a popular citation from many Mathematica guidebooks. So, what is type in Mathematica? How does it relate to common types from Haskell, for example?
I did some ...
34
votes
1
answer
1k
views
Proving the hairy ball theorem using xAct
I would like to formally prove the hairy ball theorem in Mathematica,
initially just for $S^2$, and then see about generalizing.
An approach I thought about to use the xAct package to define $S^2$
...
32
votes
6
answers
20k
views
Replacing composite variables by a single variable
To replace a single variable by another variable, one can simply use the the replace all (/.) operator (e.g., ...
32
votes
3
answers
6k
views
How to deal with complicated Gaussian integrals in Mathematica?
As we know, for most Gaussian integrals, we can get the analytical
result. Now I have many Gaussian integrals to treat, which have the
following general form,
...
32
votes
3
answers
6k
views
How to symbolically do matrix "Block Inversion"?
Consider a block (partitioned) matrix
matrix = ArrayFlatten[{{a, b}, {c, d}}]
where, a, b,...
29
votes
5
answers
6k
views
Extracting variables from an expression
I'm looking for a way to extract a list of variables from an expression, for example with an input like:
...
28
votes
3
answers
2k
views
Symbolic integration error
fixed in 10.1 (windows)
I'm running Mathematica 10.0.0 and encountered a disturbing error in the symbolic integration of a rather simple function
...
26
votes
1
answer
1k
views
Transform Root objects into Trigonometric expressions
Consider the Root objects
roots = Table[Root[-1 + 27 #1^2 - 162 #1^4 + 243 #1^6 &, i],{i,1,6}]
These can be expressed in terms trigonometric functions as ...
25
votes
3
answers
597
views
Backslide of Limit
Backslide introduced in 9.0, and persisting through 12.0.
A friend of mine showed me this example:
Limit[Sum[Sin[Pi*k/n]/(n + 1/k), {k, 1, n}], n -> Infinity]
...
24
votes
4
answers
898
views
Why does V 13.2 DSolve now return no solution instead of implicit solution for some differential equations?
V 13.2 DSolve now returns {} as solution for some ode's, while V 13.1 returns solutions for same ode's but with ...
23
votes
5
answers
6k
views
Why this real integral yields imaginary results?
This integral yields -1-4Iπ/3 in Mathematica:
Integrate[(y - y^2 + x - x^2 + 2*x*y)/(1 - x - y), {x,0,1}, {y, 0, 1}]
Since ...
23
votes
2
answers
8k
views
Non-commutative algebra
I'm constantly dealing with non-commutative algebras. ** is inbuilt, non-commutative and associative. That's good :-) But it is not distributive. Rats.
...
23
votes
2
answers
2k
views
Calculating probabilities symbolically
Is there a way to solve for statistical quantities analytically/symbolically in Mathematica?
example 1:
Lets say that I want to do a calculation that requires Bayes theorem.
I know p(a), p(b) and p(...
22
votes
4
answers
4k
views
How to calculate the volume of a convex hull?
Given a spatial curve represented by a parametric equation, is it possible in Mathematica 9 to calculate symbolically (or at least numerically) the volume of its convex hull?
22
votes
2
answers
2k
views
Incorrect results for elementary integrals when using Integrate
Bug introduced in 8.0 or earlier and persisting through 13.2 or later
There is a rather simple integral ($K_0$ is the 0-th order MacDonald function)
$$\int_0^\infty e^{-x \cosh\xi}\, d\xi = K_0(x)$$
...
22
votes
2
answers
861
views
Derivative of a pure function with SlotSequence
I can live with this but I can't figure out why the following is 0:
Derivative[1][f[##] &][x]
0
From documentation for ...
22
votes
2
answers
17k
views
How to assume all variables in my code are reals
I won't have any occasion to have any imaginary number in my code. If there are any, that is an error.
So allowing the imaginary case simply hinders the equation manipulation and simplification.
I ...
22
votes
2
answers
603
views
What does f_[whoCalled]^:=f really mean?
I came across the following post by John Doty in this Google Groups discussion:
On Friday, January 11, 2013 8:23:16 PM UTC-7, amzoti wrote:
It is clear the Mathematica uses Lisp as one ...
21
votes
3
answers
3k
views
Wrong answer from DSolve when solving a differential equation
Bug introduced in 12.0.0, fixed in 12.1.1.
I was trying to solve the following differential equation: $$\frac{dy}{dx}=x^2+y^2-1 \quad \text{and} \quad y(0)=1$$
and I used the code below:
...
21
votes
4
answers
517
views
Negative probability?
Bug introduced in 9.0.1 and fixed in 10.0.2
I am trying to get the sum of the squares of seven random variables, all uniformly distributed. This is what I tried.
...
21
votes
1
answer
6k
views
How does Mathematica integrate?
Basically, this question can be considered to be an extenstion to my other question.
What I wanted to do was this integral as homework (it is indefinite BTW so no approximations using Simpson's Rule ...
20
votes
1
answer
1k
views
Incorrect result from Integrate
Bug introduced in 8.0 and fixed in 10.0
I attempted to calculate the following integral:
...
20
votes
1
answer
606
views
What does "suitable for symbolic manipulation" in the documentation mean?
This question is related to this other one I posted on Stack Overflow some time ago. There, in a beautiful answer, acl (with some unhumble editing done by me) showed that the derivative of ...
20
votes
1
answer
388
views
Mathematica v12 Integration bug?
Bug introduced in 12.0 and fixed in 12.1
After upgrading to mathematica 12, this integral gives the wrong result, also with other types of similar integrals.
...
19
votes
6
answers
2k
views
How can I evaluate only a single step of a recursive function?
Let's say have a simple recursive function for the Fibonacci sequence
f[0] := 1
f[1] := 1
f[n_] := f[n - 1] + f[n - 2]
but I want to see how it will expand in a ...
19
votes
3
answers
5k
views
Is learning to use Mathematica useful for pure theoretical research in Mathematics and Computer Science?
I am looking for opinions from Mathematica users about Mathematica itself. After reading the faq, I thought that in some sense I "wish to solve a problem using Mathematica" ... although I understand ...
19
votes
4
answers
9k
views
Complex number operations: telling Mathematica variables are real
I want to do Conjugate[a + b*I], but when I do that, the solution is
Conjugate[a] - I*Conjugate[b]; when for me, a and b are ...
19
votes
3
answers
484
views
Coordinate-free derivative
Given the function
\begin{align*}
f \colon \mathbb{R}^n &\to \mathbb{R}^n\\
v&\mapsto \dfrac{v}{\|v\|},
\end{align*}
I would like to compute the derivative of $f$, that is $df(v)$. It is ...
19
votes
1
answer
826
views
Speeding up trigonometric integral
Context
On a possible non trivial toric topology for the Universe (nothing less!).
Problem
I would like to carry out the following integral for $\ell=2,4\cdots 20$.
$$\int _0^{\pi }\int _0^{2 \pi }...
18
votes
5
answers
9k
views
DSolve not finding solution I expected
Try to solve the following ODE via DSolve
$$
\left\{\begin{aligned}
y'(x)+2 y(x) e^x-y(x)^2 &= e^{2 x}+e^x \\
y'(0) &=1
\end{aligned}\right.
$$
The ...
18
votes
3
answers
2k
views
How to solve the Monty Hall problem?
Problem
For purely recreational purposes I would like to solve the Monty Hall problem with Mathematica using the function Probability (dedicated to the calculation ...
18
votes
2
answers
4k
views
Non-commutative symbolic linear algebra
I am fairly new to Mathematica but I thought I would be a helpful tool to carry out a few simple linear algebra calculations. It seems like an easy task but I cannot figure out how to do it. For ...
18
votes
6
answers
423
views
Prevent Plus from threading
This is probably a very simple question, but I couldn't find a duplicate.
As everybody knows, {x, y} + v gives {x + v, y + v}. ...
18
votes
2
answers
1k
views
How to do algebra on summations of variable expressions?
Is there any easy, general way to handle algebra on variable Sums?
For examples, Gaussian Mixtures or Fourier Series:
...
18
votes
1
answer
1k
views
How to represent a continuous monotonic phase of Airy functions?
Note: In this question I am concerned only with real-valued variables and functions.
DLMF, §9.8 Airy Functions, Modulus and Phase, formula $9.8.4$ defines the phase of Airy functions:
$$\theta(x)=\...
17
votes
2
answers
1k
views
Symbolic area calculation for a parametric self-intersecting closed curve
The parametric equation of the curve is:
$$\begin{cases}
x &= -9 \sin (2 t)-5 \sin (3 t) \\[6pt]
y & = 9 \cos (2 t)-5 \cos (3 t)
\end{cases}\quad t\in[0,2\pi]$$
which can be easily ...
17
votes
2
answers
2k
views
Solving quintic in radicals
I need to find an explicit expression in radicals for the real root of the quintic equation
...
17
votes
2
answers
2k
views
Why do certain values in ArcSin not fully evaluate?
This is a continuation of: Why do certain fractional values in TriangleWave not evaluate?
The analysis by R.M and rasher revealed that problem to reduce to the behavior of:
...