Questions tagged [symbolic]

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

Filter by
Sorted by
Tagged with
84 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, ...
user avatar
  • 943
65 votes
4 answers
18k 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 ...
user avatar
  • 35.5k
61 votes
2 answers
6k 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 ...
user avatar
  • 52.9k
49 votes
4 answers
18k 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 ...
user avatar
  • 4,353
47 votes
6 answers
37k 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,...
user avatar
  • 605
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 (<...
user avatar
  • 21.7k
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] *) ...
user avatar
  • 1,063
41 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,...
user avatar
  • 225k
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.,...
user avatar
  • 110k
38 votes
1 answer
967 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" ...
user avatar
  • 21.7k
37 votes
2 answers
891 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 ...
user avatar
  • 1,949
36 votes
1 answer
36k 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: ...
user avatar
  • 1,535
35 votes
4 answers
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 ...
user avatar
33 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$ ...
user avatar
32 votes
6 answers
17k 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., ...
user avatar
  • 1,377
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,...
user avatar
  • 7,299
29 votes
3 answers
5k 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, ...
user avatar
  • 291
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 ...
user avatar
27 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: ...
user avatar
  • 640
26 votes
1 answer
929 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 ...
user avatar
25 votes
3 answers
565 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] ...
user avatar
  • 52.9k
23 votes
5 answers
5k 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 ...
user avatar
  • 655
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(...
user avatar
  • 395
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?
user avatar
  • 437
22 votes
2 answers
782 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 ...
user avatar
  • 133k
21 votes
2 answers
2k 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 ...
user avatar
  • 1,414
21 votes
2 answers
7k 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. ...
user avatar
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: ...
user avatar
21 votes
4 answers
506 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. ...
user avatar
  • 2,618
21 votes
2 answers
572 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 ...
user avatar
  • 4,767
20 votes
1 answer
5k 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 ...
user avatar
  • 1,079
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: ...
user avatar
20 votes
1 answer
595 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 ...
user avatar
20 votes
1 answer
379 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. ...
user avatar
  • 551
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 ...
user avatar
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 ...
user avatar
18 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 ...
user avatar
18 votes
3 answers
446 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 ...
user avatar
  • 13.8k
18 votes
6 answers
405 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}. ...
user avatar
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: ...
user avatar
  • 4,351
18 votes
2 answers
13k 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 ...
user avatar
  • 305
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)=\...
user avatar
18 votes
1 answer
774 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 }...
user avatar
  • 21.7k
17 votes
2 answers
967 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 ...
user avatar
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: ...
user avatar
  • 264k
17 votes
3 answers
1k 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 ...
user avatar
  • 1,357
17 votes
1 answer
782 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: ...
user avatar
16 votes
7 answers
910 views

Missing solution - system of equations

Attention! This example already works as expected in Wolfram Mathematica 12.1.1.0 for function Solve. The problem was in version 12.1.0.0. Check out answer of Bob ...
user avatar
  • 168
16 votes
3 answers
1k 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 ...
user avatar
  • 6,532
16 votes
2 answers
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 ...
user avatar

1
2 3 4 5
29