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

learn more… | top users | synonyms

9
votes
2answers
2k 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 ...
13
votes
6answers
2k 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., ...
7
votes
3answers
1k 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 ...
25
votes
3answers
4k 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 ...
12
votes
1answer
1k 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
2k views

How to symbolically do matrix “Block Inversion”?

Consider a block (partitioned) matrix matrix = ArrayFlatten[{{a, b}, {c, d}}] where, a, ...
8
votes
2answers
539 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) + ...
4
votes
1answer
769 views

Symbolic integration in the complex plane

Context While answering this question, I defined (symbolic and numerical) path integrations as follows ...
8
votes
1answer
6k 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: ...
5
votes
5answers
171 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, ...
7
votes
3answers
423 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 ...
5
votes
5answers
575 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 (...
7
votes
4answers
661 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: ...
8
votes
2answers
324 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
832 views

Bug in Integrate for Mathematica

Consider the following: ...
7
votes
1answer
368 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 ...
21
votes
3answers
1k 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 ...
11
votes
1answer
249 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 ...
9
votes
2answers
563 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 ...
3
votes
1answer
443 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?
10
votes
2answers
926 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 ...
7
votes
1answer
521 views

Managing Exclusions in Plot[]

When I do: ...
9
votes
1answer
2k 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 ...
5
votes
4answers
1k 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 ...
4
votes
1answer
90 views

When to use GenerateConditions -> True

Many functions, usuallly those involving integration, take a GenerateConditions option which often defaults to False, or at ...
4
votes
1answer
572 views

Does the Im function work with symbolic arguments?

Does the Im function work with symbolic arguments? ...
-4
votes
1answer
400 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 ...
12
votes
1answer
226 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 ...
7
votes
1answer
249 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. ...
14
votes
1answer
339 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: ...
8
votes
2answers
196 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
377 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
773 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
408 views

Incorrect result from Integrate

I attempted to calculate the following integral: ...
12
votes
2answers
514 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: ...
6
votes
4answers
978 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
483 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 ...
13
votes
5answers
736 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 ...
3
votes
0answers
226 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 ...
2
votes
2answers
232 views

Rewriting one expression using a variable representing another expression [duplicate]

I have two expressions: w1 = (a+b)/c^2; w2 = (a^3 + 3 a^2 b + 3 a b^2 + b^3)/c^6; How can I ask Mathematica to try to find an alternative expression for ...
6
votes
1answer
156 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 ...
5
votes
0answers
64 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
2answers
245 views

How do I evaluate a symbolic integral involving Hermite polynomials?

I want to test a difficult integral : Integral on all reals of some complicated function involving the Hermitian polynomials, exponentials, squares, factorials, and being general considering any ...
4
votes
3answers
200 views

Why the inequality does not take into account the domain?

I have this inequality: Reduce[(4000-1000k)/(k-4) < 0] and the answer is k ∈ Reals I would expect ...
3
votes
2answers
92 views

Expectation of a composite Markov-Gamma distribution

In a model I have a discrete two-state first order Markov process, defined by a (2x2) transition matrix with two free parameters. If the first state occurs then the process outputs zero for that ...
2
votes
1answer
116 views

Prove (or check) an expression is positive given constraints on variables?

I'm trying to figure out whether an expression is always positive given positive parameters. When the expression is complicated, I can't do this by eye. Is there any way to make Mathematica prove ...
2
votes
4answers
233 views

Working with symmetric polynomials

I have a question related to working with symmetric polynomials in some variables. Let us say, I have an expression ...
1
vote
1answer
110 views

Only perform a symbolic differentiation once

I want to define a function that involves a differentiation step that Mathematica can do easily, which might be of the form ...
25
votes
3answers
855 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 ...
18
votes
4answers
838 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?