For questions about symbolic computation, as opposed to numerical computations.
2
votes
1answer
154 views
Difference between Map[f[#] + g[#] &, {a, b, c}] and Map[f[x]+g[x]&, {a, b, c}]
Map[f[#] + g[#] &, {a, b, c}] vs Map[f[x]+g[x]&, {a, b, c}]
My question is: why is the output different?
...
7
votes
1answer
233 views
Symbolic Integration along contour: branch cut problem?
Context
Following this question on path integrals in the complex plane, having defined again a numerical and symbolic integrator along a path as
...
4
votes
2answers
611 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 ...
3
votes
1answer
327 views
Symbolic integration in the complex plane
Context
While answering this question, I defined (symbolic and numerical) path integrations as follows
...
2
votes
0answers
161 views
Numerical-Symbolical Integration (Calculus)
I created a simple numeric-symbolic integration. Here you can use symbolical and numerical techniques at the same time. You can also interpolate numerical integrals.
The problem with my function is ...
1
vote
0answers
143 views
What's a good data structure to represent a, b, a and b, a or b? [closed]
I have a function foobar[x_] that can produce 4 types of output
a
b
a or b
a and b
What's a good data structure, or better ...
2
votes
2answers
270 views
Superscript prime symbol
x\[Prime] looks like $x_'$, ugly right?
Is there a way to make a symbol with prime to look like $x'$?
That's what I'm trying right now:
...
0
votes
1answer
186 views
How to define a derivative/Variation operation in Mathematica from scratch
I am looking for a method in Mathematica 8 to define my own derivative/variation (independent of built-in operations). I do not want to re-define built-in objects since I fear that this could cause ...
3
votes
1answer
105 views
Identifying `Indeterminate` elements [closed]
I want to identify if a variable, which is the result of a calculation, is Indeterminate. I was trying to do this using If[]. ...
1
vote
2answers
178 views
Symbolically associate vectors and their norms
I am wondering how to handle the following situation: I do have vectors of known dimension that I would like to handle symbolically. I suppose I can do something like
...
5
votes
1answer
483 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 ...
6
votes
2answers
302 views
Symbolic manipulation with unevaluated sums
If I have two expressions with sums in them, like this:
$$\begin{align*}
b&=\frac{\sum_{i} (x_i - \bar{x})(y_i -\bar{y})}{\sum_{i}(x_i -\bar{x})^2}\\
r&=\frac{\sum_{i} (x_i - \bar{x})(y_i ...
15
votes
1answer
194 views
Polynomial expectations of generic distributions
Summary
Polynomial expectations depend only moments and cross moments of a multivariate distribution. I would like to use Expectation to compute polynomial ...
7
votes
1answer
268 views
2
votes
1answer
166 views
Identifying the sign of an expression in an interval
My expression is the following:
$$
\frac{(1-\alpha ) \alpha h^2 (h+2) \mu r}{(h+1) ((1-\alpha ) h+1) (\alpha h+1)}-\left(\frac{\alpha h \mu }{h+1}\right)^{\alpha } \left(\frac{(1-\alpha ) h \mu ...
7
votes
2answers
382 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
4answers
540 views
Mathematica gives wrong answer for integral
When I execute the following,
Integrate[Exp[-w^2 + I w^3], {w, -\[Infinity], \[Infinity]}]
I get
...
16
votes
1answer
275 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 ...
4
votes
1answer
246 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 ...
4
votes
1answer
201 views
Symbolic bit vectors
I'd like to see how addition and xoring bitvectors mix together. To do this, I implemented (a primitive) vec_add and vec_xor:
...
10
votes
1answer
631 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,
...
11
votes
1answer
662 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 ...
9
votes
1answer
257 views
How can I eliminate a function in a system of PDEs, Maple-style?
Maple can separate and eliminate a function in a system of PDE equations, with casesplit in the PDEtools package. How to do ...
6
votes
3answers
842 views
How to solve an overdetermined system in Mathematica
I would like to understand the reasons and find a way to avoid such behaviour of the Solve function in Mathematica 8.
...
22
votes
1answer
404 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" ...
2
votes
1answer
212 views
Reduce/Solve an equation with symbols in powers
I am trying to solve the following equation with respect to x.
eqn = x^z + y == a;
But when I do
...
2
votes
2answers
161 views
How to find solutions that yield of root of unity?
I have a polynomial with coefficients that are integer polynomials in another (complex) variable. For example:
1 + (1 - v^2) #1 + (-3 - v^2) #1^2 + #1^3 &
I ...
5
votes
1answer
136 views
Finding ranges of a parameter for which a function is always positive
I have a complex function of a single variable expressed in analytical form, which also depends on a parameter. I would like to have Mathematica show me for which values of the parameter the real part ...
2
votes
1answer
120 views
Simplification of a symbolic manipulation involving functions of more than one variable
I am facing the following problem.
f[x_,y_] = a[x] u[y] + b[x] v[y]
Now I can ask Mathematica to calculate
...
8
votes
2answers
138 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
...
6
votes
3answers
459 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 ...
4
votes
1answer
364 views
Does the Im function work with symbolic arguments?
Does the Im function work with symbolic arguments?
...
10
votes
2answers
552 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 ...
11
votes
1answer
435 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 ...
11
votes
2answers
370 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
1answer
141 views
Sophistication of Series[…]
I'll give a concrete example and I hope that my general question will be clear.
Say I have three variables, $f$, $g$, $h$, and I know that $f=\mathcal O(x)$, $g=\mathcal O(x^2)$, $h=\mathcal O(x^3)$ ...
6
votes
1answer
490 views
Why does this sum not simplify properly?
I was trying to get Mathematica to simplify some moderately ugly sums and I ran into some pretty weird behaviour, which I tracked down to the following example. I'm working with ...
8
votes
2answers
658 views
10
votes
1answer
168 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 ...
13
votes
5answers
626 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 ...
18
votes
3answers
820 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 ...
10
votes
6answers
902 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., ...
5
votes
1answer
212 views
Validating simplifications analytically
I have a rather complex expression which I would like to simplify and check my work along the way (Mathematica does not simplify very basic things and it is frustrating me). In the following example, ...
7
votes
1answer
2k 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:
...
2
votes
1answer
183 views
Integral not simplifying
I specify a function in terms of an integral and then try to evaluate it with Simplify. However, the answer is not really simplified to what it should be.
...
20
votes
3answers
1k 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 ...
3
votes
1answer
167 views
n-fold symbolic integral in Mathematica
I am trying to compute symbolically a n-fold integral (n is a parameter of a function) over, say, the cube [0,a]^n. My code looks like this
...
3
votes
1answer
389 views
Definite and Indefinite integral give different results for piecewise function
I have the following function:
$$
f(q,y)=
\begin{cases}
\tfrac{11720+p}{37791360} & -11720<p<-7720 \\
0 & \text{True}
\end{cases}
$$
where $p = 443\ y-777600\ \sin^{-1}\left(\frac{q ...
16
votes
3answers
1k views
How to symbolically do matrix “Block Inversion”?
Consider a block (partitioned) matrix
matrix = ArrayFlatten[{{a, b}, {c, d}}]
where, a, ...
