Questions tagged [symbolic]

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

Filter by
Sorted by
Tagged with
49 votes
4 answers
17k 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
58 votes
1 answer
6k 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. ...
user avatar
  • 51.4k
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
26 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
  • 630
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.4k
10 votes
3 answers
5k 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 ...
user avatar
  • 68.7k
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
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
12 votes
1 answer
1k 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. ...
user avatar
  • 51.4k
14 votes
6 answers
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 (...
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,347
6 votes
5 answers
451 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, ...
user avatar
  • 1,028
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
7 votes
2 answers
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 ...
user avatar
13 votes
4 answers
7k 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 ...
user avatar
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
10 votes
4 answers
653 views

How do I invoke the default complexity function?

Documentation on ComplexityFunction says: With the default setting ComplexityFunction->Automatic, forms are ranked ...
user avatar
9 votes
1 answer
261 views

When to use GenerateConditions -> True

Many functions, usuallly those involving integration, take a GenerateConditions option which often defaults to False, or at ...
user avatar
10 votes
2 answers
2k 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)...
user avatar
  • 1,041
31 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,289
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
  • 224k
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,331
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
10 votes
3 answers
682 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 ...
user avatar
  • 2,058
7 votes
3 answers
1k views

How to implement Einstein summation convention with differential operators

Statement of this problem: In the textbook, the following differential equilibrium equations can be expressed by tensors: Using Einstein's summation convention, the formula in the figure above can be ...
user avatar
22 votes
2 answers
777 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
  • 132k
10 votes
3 answers
2k views

Three dimensional Laplacian insulated on lateral faces and convectively exposed on transverse faces (updated)

I have the three dimensional Laplacian $\nabla^2 T(x,y,z)=0$ representing temperature distribution in a cuboid shaped wall which is exposed to two fluids flowing perpendicular to each other on either ...
user avatar
  • 143
12 votes
1 answer
2k views

Managing Exclusions in Plot[ ]

When I do: ...
user avatar
3 votes
4 answers
3k 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 ...
user avatar
  • 51
9 votes
0 answers
149 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: ...
user avatar
  • 224k
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
5 votes
4 answers
580 views

Evaluate the defining Integral of the Bessel functions of the first kind

I am trying to evaluate the integrals $$ \int\limits_{-\pi}^{\pi} \mathrm{e}^{\mathrm{i}(x\sin t - nt)} \mathrm{d}t $$ and $$ \int\limits_{-\pi}^{\pi} \mathrm{e}^{\mathrm{i}x\sin t} \mathrm{d}t $$ ...
user avatar
9 votes
3 answers
755 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 ...
user avatar
  • 13.3k
8 votes
8 answers
1k 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 ...
user avatar
  • 108k
5 votes
2 answers
1k views

Compute Hessian of function symbolically

This question could equally apply to the computation of other symbolic transformations of a function, but I use the Hessian as an example here. Consider a two-variable function ...
user avatar
  • 224k
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
36 votes
1 answer
35k 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
12 votes
1 answer
949 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. ...
user avatar
  • 224k
26 votes
1 answer
923 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
21 votes
2 answers
570 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,677
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
12 votes
1 answer
560 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 ...
user avatar
  • 1,535
7 votes
1 answer
441 views

Symbolic calculation with generators and relations

Is it possible to do the following in Mathematica: Define an algebra $A$ via generators and relations and multiply some tensors in $A\otimes A$ (and of course simplify the relations via the relations)...
user avatar
11 votes
2 answers
2k 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 ...
user avatar
  • 224k
6 votes
2 answers
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 ...
user avatar
15 votes
5 answers
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 ...
user avatar
  • 4,353
13 votes
3 answers
3k 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 ...
user avatar
10 votes
2 answers
743 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 <...
user avatar
5 votes
1 answer
651 views

How to decompose a complex expression containing repeated subexpressions? [duplicate]

Suppose I have an expression like ...
user avatar
3 votes
1 answer
443 views

Inverse Laplace transform of this complicated function

I have been solving a coupled PDE system analytically and I need to find the inverse Laplace transform of $(1)$ and get $T(x,y)$. $s$ is the Laplace domain variable and $\alpha, \beta, \gamma, T_{fi}, ...
user avatar
  • 143

1
2 3 4 5 6