Questions tagged [symbolic]
For questions about symbolic computation, as opposed to numerical computations.
1,568
questions
9
votes
3
answers
3k
views
RowReduce for symbolic matrices
I'd like to invoke RowReduce on some matrices with a time parameter.
For example consider
A = {{1, 0}, {0, t}}
If ...
9
votes
2
answers
230
views
How can I make FourierCoefficient et al. handle the zero-order term correctly?
Say that I would like to use Mathematica to step through one of the most famous solutions to the Basel Problem, using Parseval's Identity,
$$ \sum_{n = -\infty}^\infty \left|c_n\right|^2 = \frac{1}{2\...
9
votes
1
answer
1k
views
Define an operator with the distributive property
I would like to define the ⊕ operator with distributive, associative, and commutative properties - so that Mathematica can symbolically simplify expressions I use ...
9
votes
2
answers
995
views
How to symbolically differentiate an infinite series without evaluating the series itself
I'm dealing with finite sums of infinite series. Each of the infinite series possesses a different starting index, i.e. each of the series begins at n = 0, n = 1, or n = 2. As a result, it's important ...
9
votes
1
answer
293
views
Nice use case for symbolic tensors?
I come from before the times of symbolic tensors in Mathematica, and am used to working with concrete tensors and custom commands to contract them using Transpose, Dot, etc.
I recently realized that ...
9
votes
1
answer
533
views
Verifying and deriving basic (block) matrix identities
How can I use the new symbolic matrix/tensor capabilities to verify matrix identities, such as
(1)
or
(2)
Even better, how can I ask Mathematica to derive expressions for X, Y, Z, and U like ...
9
votes
1
answer
347
views
Comparing exact expressions for equality -- is it really OK if I get wrong answer?
Bug introduced in 7.0 or earlier and fixed in 10.2.0
I found an unexpected behavior (that I think of as a bug) in evaluation of the equality operator applied to mathematical functions with exact ...
9
votes
2
answers
1k
views
Bug in Integrate for Mathematica
Bug introduced in 8.0.0 and fixed in 9.0.0
Consider the following:
...
9
votes
1
answer
142
views
DSolve fails with four variables
How is that DSolve has no trouble solving this:
DSolve[{
D[G[x1,x2,x3],x1]==0,
D[G[x1,x2,x3],x2]==0,
D[G[x1,x2,x3],x3]==0
},G[x1,x2,x3],{x1,x2,x3}]
but it fails ...
9
votes
1
answer
2k
views
General suggestions to accelerate Simplify and FullSimplify
To my understanding, the function Simplify[] and FullSimplify[] work by applying a series of built-in transformation rules to ...
9
votes
0
answers
184
views
Symbolically evaluating gradients/Hessians
I'm taking a machine learning course, which involves taking a lot of analytical gradients and Hessians. It would be ideal if I could perform these calculations in Mathematica. However, I am only aware ...
9
votes
0
answers
883
views
Symbolic Weak Form
Usually I write the weak form by hand for my FEM code, but it's a little annoying and mechanic sometimes.
So, I wonder, is there any way to generate the symbolic weak form in Mathematica? For ...
9
votes
0
answers
154
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:
...
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 ...
8
votes
3
answers
1k
views
Exact Differentials
I just started using Mathematica so my apologies if this is a very basic question. I tried to find related questions on this forum but couldn't, so here goes. I have an equation,
$\quad \quad dp =\...
8
votes
6
answers
243
views
Adding elements to some sublists of unequal length
Complicated title for a simple problem:
I have list
a = {{1, 3, 5, 2}, {2, 6, 2}, {3, 5, 6, 1, 2}, {4, 2}}
In which the first element of each sublist is ...
8
votes
2
answers
538
views
Can I get rid of the noise in my differential equation solution?
I am solving a differential equation:
...
8
votes
3
answers
587
views
Series expansion wrong
I had to work with some series expansions lately, and at some point I realised that something was becoming inconsistent at some point. It seems that applying Factor ...
8
votes
2
answers
375
views
Calculating sum of BesselJ[n, x]
My friend has a sum in his research paper that looks like this
$$
\sum_{n=-\infty}^{\infty}\frac{J_n^2(x)}{n-\kappa}.
$$
He was able to calculate this sum analytically, by substituting the ...
8
votes
2
answers
3k
views
Piecewise differential equation
Say I have a very trivial function
$$
V\left(r\right)=\begin{cases}
-V_{0} & 0\leq r\leq R\\
0 & r>R
\end{cases}
$$
with $V_{0}>0$ and $R>0$. I would like to let Mathematica solve ...
8
votes
2
answers
301
views
How to represent $f(x) = (y-x)^k \log(y-x)$ as a summation of the form $f(x) = \sum\limits_{j=0}^\infty \cdots$?
I am having a lot of trouble working with summations in Mathematica, and this is unfortunate as it is my main use case for the application My latest summation issue is the following. I am trying to ...
8
votes
3
answers
712
views
Is this solution to nonlinear first order ODE correct?
Mathematica 11.3.
I am not sure if this solution given by Mathematica is correct. But I'd like to ask the experts.
...
8
votes
2
answers
241
views
Issue with Upvalues
I want to introduce two variables (I call them EXt and EXtC, where "C" stands for complex conjugate) which would mimic the behavior of a phase of a complex number. For that, I use the following tags:
...
8
votes
2
answers
571
views
Lookup in Inverse Symbolic Calculator+ from Mathematica
There is a useful feature in WolframAlpha that allows to find a possible closed form for approximate numeric values. It can be used, for example, to guess the value of an integral that Mathematica ...
8
votes
1
answer
481
views
Implement abstract algebraic structure
I would like to implement algebraic structures in Mathematica such as groups, algebras, Lie-algebras, Hopf-algebras, ... In particular, after initialising such a structure, I would like to have
...
8
votes
1
answer
279
views
How to assign up-values for `Derivative`?
I have defined several custom analytic functions. Here is the simplest example:
ln[x_, a_?NumericQ] := Piecewise[{{Log[x], Re[a] > 0}, {-Log[1/x], True}}]
...
8
votes
2
answers
274
views
Representing a value in an output as a self defined variable
I'm trying to find a way to have Mathematica always represent a numerical value as a self defined variable that I define using lhs=rhs. For example, if I execute
<...
8
votes
1
answer
11k
views
How to Make a change of variables
I have the following expresion
$$\hat{M}^2=-\left[\frac{1}{\sin\beta}\frac{\partial}{\partial\beta}\sin\beta\frac{\partial}{\partial\beta}+\frac{1}{sin^2\beta}\left(\frac{\partial^2}{\partial\alpha^2}...
8
votes
2
answers
252
views
Finding sub-expressions that simplify larger formula
If I use FullSimplify on a large formula it will consequently return a much smaller expression. However, suppose I notice the simplified expression can benefit from ...
8
votes
1
answer
209
views
Available Methods for DSolve?
I would like to know, apart from Method->Automatic what are available methods for DSolve.
...
8
votes
3
answers
628
views
Zero result from a positive integral
Bug introduced in 12.2 or earlier and persisting through 13.0.1.
How to calculate the following symbolic integral in MMA?
Every variable is real. Although the integrand is always positive, MMA (mine ...
8
votes
2
answers
360
views
Two-dimensional Laplacian coupled with another equation leading to a BVP with integral bc(s)
I have the two-dimensional Laplacian $(\nabla^2 T(x,y)=0)$ coupled with another equation. The Laplacian is defined over $x\in[0,L], y\in[0,l]$. On manipulating the second equation (which I have ...
8
votes
2
answers
535
views
DEigensystem gives x-dependent eigenvalues
Bug introduced in Version 11 or earlier and persisting through 12.1. Reported to Wolfram Technical Support as CASE:4532301.
I am considering the eigenvalue problem associated with the double-well ...
8
votes
1
answer
279
views
Unexpected Behavior from Integrate with PrincipalValue -> True
Bug introduced in 9.0 or earlier and persisting through 12.1 or later. Reported to Wolfram, Inc. as CASE:4544446.
The following code, taken from my answer to 97024,
...
8
votes
3
answers
1k
views
Symbolic integration in real domain only ( assumptions and ComplexExpand don't work)
Integrate[m^2/((x - m^2)^2 + y^2), m]
mathematica gives me a complex-valued reuslt, but maple 17 gives me what I want.
I tried using assumptions, but it doesn't ...
8
votes
1
answer
808
views
Simplification of double symbolic sums containing a DiscreteDelta without explicit summation range
I am trying to get Mathematica to automatically do simplifications like the following:
$$\sum\limits_{q}^{q\in qV}\sum\limits_{q'}^{q'\in q'V}{f(q)g(q')\delta(q-q')}=\sum_{q}^{q\in qV}{f(q)g(q)}.$$
...
8
votes
1
answer
168
views
DSolve leaks internal error messages when attempting to solve two first order autonomous ODEs
Issue reported to Wolfram, Inc as a possible bug in Version 12.1.1; CASE:4630268.
With Mathematica "12.1.1 for Microsoft Windows (64-bit) (June 19, 2020)", ...
8
votes
1
answer
2k
views
How to extract a possible closed form from WolframAlpha[] output
To find a possible closed form of a number, I can use the function
WolframAlpha["6.38905609893065", IncludePods -> "PossibleClosedForm"]
It returns a result ...
8
votes
1
answer
169
views
What should I learn from DSolve working better with a named constant than a number in this case?
I have an equation
$$\bigl(r''(\phi)r(\phi) - r'(\phi)^2\bigr)\bigl(b + r(\phi)\bigr) = r(\phi)\bigl(r'(\phi)^2 + r(\phi)^2\bigr)$$
Here $b$ and $r$ are lengths, and $\phi$ is an angle (in radians, so ...
8
votes
2
answers
465
views
How to implement a formal expectation operator over an unknown distribution?
I need to do some simplification of an expression involving averages over a stochastic variable (in order to verify a long analytical calculation).
The easiest way to do that, I figured, were if I ...
8
votes
1
answer
140
views
Order of boundary condition inside DSolve matters?
Bug introduced in 11.1.1 or earlier, fixed in 12.3.1 or earlier.
Consider the following example:
...
8
votes
1
answer
409
views
Obtaining both Solutions of Linear, Second-Order ODE using DSolve
Bug introduced in 10.4 or earlier and persisting through 11.3
Reported as CASE:3849226.
While attempting to provide a general answer for question 138321, I obtained a result,
...
8
votes
0
answers
164
views
Is there a way to submit new closed form solutions to Wolfram? [closed]
I seem to keep coming across formulae that are not evaluated by Mathematica. For instance, today I was checking
$$\sum_{k=1}^\infty\frac{(-1)^{k-1}}{k}\sum_{n=0}^\infty \frac{1}{k2^n+1}$$
(from this ...
8
votes
0
answers
276
views
Spurious DSolve Solution
Bug introduced in 8.0.4 or earlier, persisting through 13.2.
DSolve quickly returns solutions to the following PDE (which is the homogeneous portion of the PDE in ...
7
votes
4
answers
601
views
What is wrong with my approach to solving a heat transfer PDE?
I wanna solve the following heat transfer PDE using Mathematica.
$\qquad u_{xx}=u_{t}$
with following conditions:
$\qquad
\begin{cases}u(x,0)=sin(x) &0<x<\pi &,t>0\\u_{x}(0,t)=1\\...
7
votes
3
answers
513
views
Iterated differential operator
I would like to implement the following differential operator in Mathematica,
$$
\prod_{j=1}^n \left({\mathrm d \over \mathrm d x}-j\right)
$$
On a case by case basis, I can just expand it out and ...
7
votes
2
answers
3k
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 ...
7
votes
3
answers
2k
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 ...
7
votes
2
answers
357
views
How to generate a horizontal histogram with words?
I have a dataset of the type:
...
7
votes
3
answers
486
views
Symbolic manipulation of expression with undefined function
I have an expression which is a sum of undefined function v[n1,n2,n3,n4] with 4 arguments (n_i are integers):
...