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

learn more… | top users | synonyms

18
votes
2answers
3k 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 ...
15
votes
6answers
4k 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., ...
8
votes
3answers
2k views

Using D to find a symbolic derivative

I need to do the following: Define a function Take the derivative of this function and have a look at the symoblic representation Substitute in some values With the bonus that I want to use the ...
28
votes
3answers
6k 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 ...
14
votes
1answer
2k 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 ...
5
votes
5answers
211 views

Is there an analogue of the Variables command for general expressions?

The command Variables[poly] gives me a list of all variables that appear in the expression poly, which involved sums, ...
9
votes
2answers
669 views

Why aren't these additions of integrals and summations equal?

I have the following code: Simplify[Integrate[f[x] + g[x], x] == Integrate[f[x], x] + Integrate[g[x], x]] To test: $$\int{\left(f(x) + ...
6
votes
5answers
965 views

Prevent Part[] from trying to extract parts of symbolic expressions

If you have a list, e.g. {1, 2, 3} then you can extract the $k$th part using Part (...
23
votes
3answers
3k views

How to symbolically do matrix “Block Inversion”?

Consider a block (partitioned) matrix matrix = ArrayFlatten[{{a, b}, {c, d}}] where, a, ...
9
votes
4answers
1k 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: ...
11
votes
1answer
770 views

Managing Exclusions in Plot[ ]

When I do: ...
5
votes
1answer
1k views

Symbolic integration in the complex plane

Context While answering this question, I defined (symbolic and numerical) path integrations as follows ...
11
votes
1answer
9k 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: ...
9
votes
1answer
155 views

When to use GenerateConditions -> True

Many functions, usuallly those involving integration, take a GenerateConditions option which often defaults to False, or at ...
7
votes
3answers
512 views

Efficient code for solve this equation

We have $a*b*c=-1$, $\frac{a^2}{c}+\frac{b}{c^2}=1$, $a^2 b+a c^2+b^2 c=t$ What's the value of $a^5 c+a b^5+b c^5$? I tried ...
4
votes
7answers
448 views

Given a symbolic expression how to find if starts with a minus or not?

I am using a Mathematica function which returns some error term in symbolic form. I needed a way to determine if this term starts with a minus sign or not. There will be only one term. This is to ...
9
votes
1answer
318 views

Is there a way to see the result of NIntegrate's symbolic preprocessing?

NIntegrate can do a number of different types of symbolic preprocessing on the integrand before starting the numerical calculations, including changes of variables. ...
11
votes
1answer
308 views

Why does Assuming[x > 0, TrueQ[x > 0]] return False?

Assuming[x>0,TrueQ[x>0]] should, as I understand it, test TrueQ[x>0] after assuming ...
3
votes
1answer
518 views

How do I solve $1 - (1 - (A x)^2)^\frac{3}{2} - B(1 - \cos(x))= 0$?

Consider the equation $$ 1 - (1 - (A x)^2)^\frac{3}{2} - B(1 - \cos(x)) = 0 $$ where $A,B \in \mathbb{R}$ are constants. What is the analytic solution?
9
votes
2answers
564 views

Telling mathematica to output * instead of space for multiplication, so I can copy as plain text

I am trying to get some symbolic expressions in Mathematica which I would like to paste into my C/MATLAB codes. This can be accomplished nicely by selecting the expression and right-clicking to ...
8
votes
2answers
893 views

Bug in Integrate for Mathematica

Consider the following: ...
7
votes
1answer
472 views

Mathematica 9 can't integrate this function but earlier versions could

Integrate[ ArcTan[x]/(1 + x) Log[(1 + x^2)/2], {x, -1, 1}] I used Mathematica 9.0.1 on Windows7 32bit, Mathematica 9 cannot compute this, but Mathematica 8 gives ...
32
votes
1answer
649 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" ...
23
votes
3answers
2k 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 ...
20
votes
1answer
673 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. ...
9
votes
2answers
761 views

Find closed form expression for series expansion coefficients [duplicate]

Is there a built-in function that will find a general expression for the coefficient of the series expansion of a function? Series will only give the explicit ...
10
votes
5answers
2k 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 ...
5
votes
1answer
1k 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. ...
10
votes
2answers
1k 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 ...
9
votes
1answer
4k 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 ...
7
votes
4answers
242 views

How do I invoke the default complexity function?

Documentation on ComplexityFunction says: With the default setting ComplexityFunction->Automatic, forms are ranked ...
6
votes
0answers
84 views

When and why are Assuming and Assumptions not equivalent? [duplicate]

In this question there's an example of an integral where using Assuming and Assumptions give different results: ...
4
votes
1answer
690 views

Does the Im function work with symbolic arguments?

Does the Im function work with symbolic arguments? ...
-4
votes
1answer
553 views

Symbolic Definite Integration

How do I perform Integrate[Sin[x]^2/(z^2 + R^2 - 2 zRCos[x])^(3/2), {x, 0, Pi}] where z and ...
26
votes
3answers
1k 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 ...
12
votes
1answer
244 views

Symbolic computations with already assigned variables

For example I have assigned some variables that could defined in terms of each other. Then I for some reason need to derive some formula using this variables. How to show the result of this ...
8
votes
1answer
240 views

Expanding derivatives of hypergeometric functions

Sometimes Mathematica expresses results of integration or summation in terms of symbolic derivatives of Hypergeometric2F1 function, and cannot further simplify ...
16
votes
1answer
471 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: ...
25
votes
3answers
698 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 ...
8
votes
2answers
259 views

How to simplify an expression with special functions to zero

The following is a well-known Bessel function identity: $$J_{-n}(z)=(-1)^n J_n(z),\qquad n\in\mathbb Z$$ To check this, I used the following code and the result is as what I expected. ...
16
votes
1answer
419 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 ...
15
votes
2answers
971 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: ...
20
votes
1answer
541 views

Incorrect result from Integrate

Bug introduced in 8.0 and fixed in 10.0 I attempted to calculate the following integral: ...
12
votes
2answers
584 views

Surprises simplifying simple polynomials

I came across some somewhat surprising behavior of Simplify today, on something very simple. Let's take two cubic polynomials that we know have the same value: ...
7
votes
4answers
1k views

Mathematica gives wrong answer for an integral

When I execute the following, Integrate[ Exp[-w^2 + I w^3], {w, -∞, ∞}] I get (2 E^(2/27) BesselK[1/3, 2/27])/(3 Sqrt[3]) ...
4
votes
0answers
606 views

Analytically solve the eigenvalue problem with infinite dimensions by Mathematica?

If I am given a symbolic expression of all the matrix elements in an infinite-dimensional space, e.g., the Hamiltonian of a quantum mechanical system, is it possible to get the symbolic expression for ...
14
votes
1answer
591 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 ...
13
votes
5answers
784 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 ...
7
votes
1answer
197 views

Symbolic tensor simplifications and the identity matrix

How can I get Mathematica to simplify the following expressions, with $Assumptions including Element[n,Integers], n > 0, and ...
3
votes
0answers
246 views

Malliavin Derivative with Mathematica is it possible?

Is it possible to define a Malliavin calculus with Mathematica 9? Consider a random variables on the Wiener-space $\Omega=\mathcal{C}([0,1])$ of the form ...