Questions tagged [symbolic]

For questions about symbolic computation, as opposed to numerical computations.

Filter by
Sorted by
Tagged with
72
votes
5answers
4k 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, ...
57
votes
4answers
14k 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 ...
44
votes
1answer
4k views

Analogue for Maple's dchange - change of variables in differential expressions

Maple owns an interesting function called dchange which can change the variables of differential equations, but there seems to be no such function in Mathematica. ...
43
votes
2answers
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] *) ...
41
votes
3answers
3k 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 (<...
40
votes
3answers
11k 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 ...
39
votes
4answers
1k 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
1answer
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,...
37
votes
2answers
829 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 ...
37
votes
1answer
871 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" ...
33
votes
4answers
3k 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 ...
33
votes
1answer
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$ ...
30
votes
1answer
27k 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: ...
28
votes
3answers
5k views

How to symbolically do matrix “Block Inversion”?

Consider a block (partitioned) matrix matrix = ArrayFlatten[{{a, b}, {c, d}}] where, a, b,...
28
votes
3answers
1k 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 ...
27
votes
6answers
13k 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., ...
25
votes
3answers
3k 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, ...
24
votes
1answer
801 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 ...
24
votes
3answers
495 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] ...
23
votes
5answers
4k 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: ...
22
votes
2answers
579 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 ...
21
votes
4answers
478 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
2answers
496 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 ...
20
votes
5answers
4k 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 ...
20
votes
4answers
3k 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?
20
votes
2answers
2k views

Wrong answer from DSolve when solving a differential equation

Bug introduced in 12.0.0 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: ...
20
votes
1answer
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
1answer
527 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
2answers
1k 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(...
19
votes
2answers
1k views

Incorrect results for elementary integrals when using Integrate

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)$$ which mathematica cannot solve. This even though the documentation ...
19
votes
1answer
4k 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 ...
18
votes
3answers
4k 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 ...
18
votes
6answers
381 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
1answer
895 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
6answers
1k 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 ...
17
votes
2answers
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: ...
17
votes
1answer
659 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 }...
17
votes
1answer
483 views

Mathematica incorrectly giving zero for partial derivative

Bug introduced in 9.0 and fixed in 11.1 Mathematica is incorrectly reporting that the partial derivative of a certain expression is zero. I try to compute the following: ...
16
votes
3answers
982 views

Solve a trig equation system

Background of the problem In the same plane, P is a fixed point, A,B,C are moving point, PA=a, PB=b, PC=c, find the maximize perimeter of △ABC. let ∠BPC=A, ∠CPA=B, ∠APB=2*Pi-A-B, then the perimeter ...
16
votes
2answers
684 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 ...
16
votes
2answers
967 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: ...
16
votes
1answer
469 views

Polynomial expectations of generic distributions

Summary Polynomial expectations depend only moments and cross moments of a multivariate distribution. I would like to use Expectation to compute polynomial ...
15
votes
5answers
985 views

Does $x>0$ imply that $x\in\mathbb{R}$?

Let’s assume I input Assuming[x > 0, expression] Is it assumed by Mathematica that $x$ is a real number? Or that the real part of $x$ is positive? Something ...
15
votes
5answers
3k views

How to get exact roots of this polynomial?

The equation $$ 64x^7 -112x^5 -8x^4 +56x^3 +8x^2 -7x - 1 = 0 $$ has seven solutions $x = 1$, $x = -\dfrac{1}{2}$ and $x = \cos \dfrac{2n\pi}{11}$, where $n$ runs from $1$ to $5$. With ...
15
votes
2answers
425 views

Factor a polynomial Root into Roots of smallest possible degree

Suppose I have a polynomial Root representing an algebraic number. I want to represent it as a product of several polynomial Root...
15
votes
2answers
902 views

Does anyone have experience with performing symbolic regression using Mathematica?

I understand that there is at least one Mathematica package, DataModeler commercially available for symbolic regression. I'm seeking any observations with this or any other similar tool. I'm ...
15
votes
1answer
351 views

Why does Mathematica think this series doesn't converge?

Bug introduced in 10.0 and fixed in 11.1 (reported as CASE:3790525) Here's a simple series: Sum[t^k DiscreteDelta[k]/k!,{k,0,Infinity}] Mathematica says that ...
15
votes
3answers
412 views

Symbolic sum of Stirling numbers gives wrong answer

Bug introduced in 9.0.1 or earlier and fixed in 10.4.1 This issue originated from my attempt to answer a question on MathOverflow: ...
14
votes
4answers
1k views

Analytic solution to Newtonian gravity differential equation

I was told that I could obtain an analytic solution to a particle falling under the influence of Newtonian gravity by using DSolveValue. What I am given $G = M = ...
14
votes
2answers
3k 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 ...