Questions tagged [symbolic]

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

Filter by
Sorted by
Tagged with
40
votes
3answers
12k 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
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. ...
57
votes
4answers
15k 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 ...
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: ...
10
votes
3answers
4k 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 ...
13
votes
3answers
7k 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 ...
13
votes
6answers
4k 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 (...
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 ...
6
votes
5answers
374 views

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

The command Variables[poly] gives me a list of all variables that appear in the expression poly, which involved sums, ...
72
votes
5answers
5k 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, ...
27
votes
6answers
14k 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, ...
6
votes
2answers
2k views

Why Can't `DSolve` Find a Solution for this ODE?

I wanted to find a basis for the set of solutions of the following ODE. $$y^{''}+\frac{1}{x^2+1}y^{'}(x)+\left[-1-\frac{1}{x^2+1}\right]y(x)=0$$ But when I try to use ...
11
votes
4answers
5k 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 ...
9
votes
1answer
220 views

When to use GenerateConditions -> True

Many functions, usuallly those involving integration, take a GenerateConditions option which often defaults to False, or at ...
10
votes
2answers
1k 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) + g(x)\right)dx}=\int{f(x)...
10
votes
4answers
512 views

How do I invoke the default complexity function?

Documentation on ComplexityFunction says: With the default setting ComplexityFunction->Automatic, forms are ranked ...
6
votes
1answer
557 views

Implement finite Fourier transforms

Recently I came across finite Fourier transforms, which can be used for solving certain type of boundary value problem (BVP) of linear partial differential equation (PDE) with constant coefficient. ...
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,...
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,...
16
votes
2answers
993 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: ...
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 ...
22
votes
2answers
592 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 ...
12
votes
1answer
2k views

Managing Exclusions in Plot[ ]

When I do: ...
2
votes
4answers
2k views

How do I evaluate several n-th derivatives of a function at one point?

I have a question where I have to compute a Table containing $f^{(n)}(0)$ for n = 1, ..., 5, where $f^{(n)}$ denotes the $n$th ...
37
votes
1answer
873 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" ...
6
votes
8answers
871 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 ...
31
votes
1answer
28k 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: ...
11
votes
1answer
771 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. ...
21
votes
2answers
499 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 ...
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 ...
12
votes
1answer
462 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 ...
10
votes
2answers
1k 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 ...
6
votes
3answers
309 views

Reduce ODE into 1st order

I have an explicit set of differential equations: $ \ddot{x}=f(x,\dot{x})$ I would like to reduce it in the following way: $ \dot{y} = g(y)$ by substitutions as shown here: wikipedia. I have done ...
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 ...
12
votes
3answers
2k 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 ...
9
votes
2answers
1k views

Bug in Integrate for Mathematica

Bug introduced in 8.0.0 and fixed in 9.0.0 Consider the following: ...
9
votes
0answers
130 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: ...
2
votes
1answer
136 views

DSolve gets stuck on system of differential equations with unassigned variable

Hopefully someone can help me with this problem. I'm running a fairly simple script that involves some matrix operations and ends with a fairly nasty system of differential equations: ...
7
votes
3answers
696 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 ...
2
votes
1answer
173 views
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 (<...
21
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?
5
votes
1answer
2k views

Symbolic integration in the complex plane

Context While answering this question, I defined (symbolic and numerical) path integrations as follows ...
24
votes
1answer
806 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 ...
11
votes
1answer
7k 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 ...
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 ...
24
votes
3answers
497 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] ...
6
votes
2answers
1k views

Why doesn't FullSimplify simplify expressions with DiracDelta?

I want to simplify a complicated expression with some Dirac delta distributions, but FullSimplify does not do what I want. Specifically, I want ...
6
votes
3answers
550 views

Transform Piecewise[] into sum of indicators

I'm interested in transforming a piecewise defined function into a sum of indicator functions, ultimately with the aim to be better able to integrate them. As an example I would like to transform the ...