Questions tagged [mathematica]
A powerful mathematical programming software with high level symbolic manipulation capacity.
50
questions
-2
votes
1
answer
131
views
Question re Maxima, Magma and/or Sage computational language capabilities
I was in touch with Mathematica development team and they indicated that currently Mathematica is not capable to determine whether
$$ Sum[Binomial[n - 1, n - i] Sum[Binomial[k + i, i] Binomial[n - 1, ...
2
votes
0
answers
102
views
Conceptual doubt regarding 2D conjugate heat transfer modelling (COMSOL and Mathemtica)
I have been dealing with some conceptual flaws in my understanding of modelling, which I will elaborate herein. I am modelling conjugate heat transfer of a reciprocating fluid, which flows with ...
1
vote
2
answers
119
views
Calculate the derivative of the finite-difference method result
I have a nonlinear boundary ODE,
$$y'' + 3 y y' = 0, \qquad y(0) = 0, y(2)=1 $$
I want to solve this using the finite-difference method. I obtained the result for the data set of $y(x)$ (including the ...
3
votes
1
answer
108
views
Wrong Boundary Conditions Result Using Wavelet Collocation
I have a functional $S$,
$$S = \int_{x_0}^{x_b} dx \frac{1}{z(x)^d} \sqrt{1 + \frac{z'(x)^2}{f(z)}}, \qquad f(z) = 1-\left(\frac{z(x)}{z_h}\right)^{d+1}
$$
where $d=3$ is the dimension and $z_h$ is ...
0
votes
1
answer
119
views
How to remove singularities/discontinuities on 3D plots in Matlab?
I want to plot some functions f(x,y) including singularities.
For example;
f(x,y)=tan(x-y)
In Matlab, when I run the following code
...
1
vote
0
answers
87
views
What is the limit involving `Sum`, `Subsets`, and `RankedMax` as `t` approaches infinity?
Motivation
Suppose we have a countably infinite $A$ with order and group structures and suppose $F_1,F_2,\cdot\cdot\cdot$ are an infinite sequence of finite sets (denoted $\left\{F_n\right\}_{n=1}^{\...
9
votes
1
answer
237
views
Is there a way we can compute my sum involving `subsets` more efficiently?
Suppose we have a countably infinite $A$ and $F_1,F_2,\cdot\cdot\cdot$ are an infinite sequence of finite sets (denoted $\left\{F_n\right\}_{n=1}^{\infty}$) such that $\bigcup\limits_{n=1}^{\infty}F_n=...
-1
votes
1
answer
82
views
Apply method of manufactured solution into fractional order compartment model
I am trying to solve a fractional-order 2-compartment model using the method of manufactured solution (MMS). I do understand the concept of MMS, but I am not sure how to come with a Mathematica code ...
2
votes
0
answers
100
views
Does the time-dependent 1D advection-diffusion with point sources have an analytical solution?
I am looking for the analytical solution of 1-dimensional advection-diffusion equation with several point sources, Q, along the axial length of a cylinder through which the fluid flow occurs. Neumann ...
0
votes
1
answer
162
views
Problems with the time-dependent Schrödinger equation solutions
I have this Mathematica problem that solves numerically the time-dependent Schrödinger equation in a box:
...
0
votes
1
answer
69
views
Software to find zero divisors of a ring
Are there some programs with packages that help to list all zero-divisors of the ring we desired? especially for the ring of Gaussian integers modulo $n$, $\mathbb{z}_n[i]$.
Also want to find which of ...
0
votes
2
answers
208
views
How can I learn Scientific Python?
I am an intermediate user of Matlab and Mathematica, but I would really love to start learning Python language for scientific purposes (I am interested in Maths and Physics).
Could please someone ...
1
vote
0
answers
230
views
implementation for coppersmith matrix multiplication
Is there any online implementation for the coppersmith matrix multiplication I have searched alot but can not find any? and if there is not any why is that Isn't this algotithm much faster than ...
0
votes
1
answer
73
views
why on wolframAlpha I cannot find the value of an expression?
I would like to calculate the following two expressions using Wolfram Alpha:
$$z = (x (d^2 + d (4 y - 6) - 8 y^2 + 12 y - 3) + 6 (d - 1) (y - 1) y)/(d^2 - 2 d y + 4 y^2 - 6 y + 3)$$
and
$$w = -(\...
3
votes
0
answers
112
views
Calculate the Bloch wave
The eigenvalue problem
$$\frac{d^2u}{dx^2}+2i k\frac{du}{dx}-[k^2-6\sin(x)^2]u(x)=-\mu u(x)$$
gives the first five eigenvalues with $k=0$ or $k=1$ which are $2.06$, $2.26$, $5.16$, $6.81$, and $7....
0
votes
1
answer
105
views
ISING2D with Mathematica. Searching a correct way to compute the heat capacity (mean values over several iterations)
I'm trying compute the heat capacity $C_v$ out of my simulation for the 2D-Ising model which is given by
$C_v = \frac{\langle E^2 \rangle - \langle E \rangle^2}{T^2N^2}$ ($E$: Energy, $T$: ...
1
vote
1
answer
244
views
Can a second-order ODE be "inconsistent" with its boundary conditions?
I am trying to solve a set of coupled, nonlinear ODEs. The only dependent variable is a 1-dimensional spatial coordinate, let's call it $x$. For now, I've managed to approximate away some of the ...
8
votes
1
answer
212
views
What are these oscillations?
I have a function $g(x)$ defined numerically that is sort of in between a Gaussian and a Lorentzian. It decays much slower than a Gaussian, but still faster than a simple inverse power.
I need to ...
11
votes
1
answer
226
views
Numerically Recovering Imaginary Part of Analytic Continuation from Real Part
My situation.
I have a function of a complex variable $f(z)$ defined through a complicated integral. What I am interested in is the value of this function on the imaginary axis. I have numerical ...
2
votes
0
answers
156
views
What could be causing multi-dimensional numerical integration inconsistency?
I'm trying to numerically integrate a multi-dimensional expression. The integrand is complicated; for example this is the integrand for $N=4$:
$$\begin{aligned}&x_1^6x_2^5x_3^3x_4^2(x_1-x_1x_2)(...
1
vote
0
answers
120
views
Band structure of nonlinear Schrodinger equation with one dimensional potential
I have a nonlinear Schrodinger equation which reads:
$$ \frac{1}{2} \frac{d^2u}{dx^2}+ |u|^2u + V(x)u = -i \frac{du}{dz},$$
where $V(x)=\cos(wx)+ i a \sin(wx)$ and $w$, $a$ are numbers.
How to ...
4
votes
2
answers
307
views
Writing a programming code directly from the mathematical formula?
For using any programming language, a mathematical formula should be written in the corresponding code. I wonder if there is any service (for any programming language, Matlab, Mathematica, Python, etc)...
0
votes
2
answers
470
views
Matlab, Mathematica & LAPACK returning 3 different eigenvectors
(I'm not sure which of math.se / stackoverflow / scicomp.se is the right place to ask this question)
I have a C++ code which generates a complex matrix and then calculates its eigenvalues and ...
1
vote
0
answers
123
views
Nonlinear 2D thermoconductivity equation(numerical solution) [closed]
I have to write a solver for 2D equation:
$$\partial_t u = u^2(\partial_x ^2 u + \partial_y ^2 u)$$
I try to use explicit method:
$$\partial_t u = \frac{u_{i,j}^{k+1} - u_{i,j}^k}{\tau}$$ and $$\...
6
votes
1
answer
4k
views
How to compute the Helmholtz decomposition of 2D and 3D vector fields?
I have a sample of 100 particles with their 3D positions and velocities. I want to decompose the velocity vector field to its curl free and divergence free components.
Is it a feasible to do so for ...
0
votes
1
answer
174
views
Numerical solution of nonlinear thermoconductivity equation
I have to find and plot a numerical solution for the following equation (I have to write a solver):
$$u_{t} = (u^2 u_x)_x$$ with the following conditions $u(0,t) =0, u(1,t) = \sqrt{\frac{2c-2}{t}}, u(...
4
votes
1
answer
341
views
How does Mathematica compute 'Reduce'?
I submit a Reduce command and get results like this:
...
1
vote
0
answers
846
views
Numerical Double integration with endpoint singularity in scipy Python gives incorrect answer
I am trying to integrate the following function in Python,
$\int_{0}^{\infty}\int_{0}^{\infty} \dfrac{e^{-x-y}}{B(x,y)}dx dy$,
where $B(x,y)$ is the beta function - $B(x,y) = \int_0^{1}a^{x-1}(1-a)^{...
-2
votes
2
answers
205
views
Numerically solving differential equations, the domain is very long, [0, +10^6), so the calculating time is very long
Is there any method to deal with this problem? I am using Mathematica to solve the differential equations, but the calculating time is so long because of the large domain $x\in[0,10^{6})$. In fact I ...
3
votes
2
answers
416
views
Solving coupled PDEs numerically on a semi-infinite domain with no-flux boundary conditions
I have the following system of PDEs for which I have given parameters $\gamma, \tau$ and $\mu$,
$$\begin{align}
T_t = &\ \gamma\,(L +\tau F-T)\\
F_t = & -F_x-(F-LT)\\
L_t = &\ \mu L_{xx}+...
0
votes
2
answers
554
views
How to interpolate a set of points with a continuous closed B-spline curve?
I have been learining the NURBS theory by the classical textbook "The NURBS Book" this year. In the chapter 9, the author introduced the method of non-rational B-spline curve interpolation ...
1
vote
0
answers
60
views
CAS Problem with integrals
I got this problem thrown at me, unfortunately I lack context at the moment but I thought Maple or Mathematica would solve it anyways.
I have a function $f$ over $x$ and $y$ such as this (Maple)
<...
1
vote
0
answers
213
views
Symplectic Partitioned Runge Kutta method in Mathematica [closed]
I tried to solve Hamiltonian system ($Q$ is a vector of all generalized coordinates, $P$ - of generalized momentum)
$$
\frac{\mathrm{d} Q}{\mathrm{d} t}=\frac{\partial H}{\partial P} \\
\frac{\mathrm{...
1
vote
0
answers
91
views
fixed point iteration to find out second order non-linear diff equations
I am working on some model analysis, getting two diff equations and
after I convert them into matrix form, I have equations looks like
$$ [A][X]=C\times\big(\exp([B][X])-1\big), $$
where $C$ is a ...
1
vote
0
answers
38
views
How can i get this number set to be recooperated from a product sum? [closed]
W==a(x)=2*(W* x)/41;
I'm attempting to make a new type of compression algorithm. A rubber band ball type.
I'm trying to make a software that extracts, from that formula, the secret volumes of number ...
2
votes
1
answer
365
views
Mathematica NIntegrate function in C++
I am working on computing a challenging integral. I am working with someone else who wrote some code in Mathematica to compute it. I do not have mathematica so I am trying to do the same thing in C++. ...
3
votes
1
answer
162
views
Approximate $h$ in $F(\theta)=\sin \theta \int_{-L}^{+L}h(z)e^{-ikz\cos \theta} \,dz$
Consider
$$F(\theta)=\sin \theta \int_{-L}^{+L}h(z)e^{-ikz\cos \theta} \,dz$$
$$|z|\le L$$
$$0 \le \theta \le \pi$$
By having knowledge of $F(\theta)$, how can one approximate $h(z)$? In addition, I ...
0
votes
2
answers
4k
views
Most efficient library to diagonalize exactly large hermitian or unitary matrices
I am working on a physics problem which requires obtaining the exact eigenvalues and eigenvectors of Hermitian and Unitary matrices numerically. Naturally I would like to ask the experts what are the ...
4
votes
1
answer
1k
views
Comparing Eigenvectors, Mathematica vs. Matlab
I am trying to create the same outputs in Mathematica and Matlab, however I am running into trouble aligning the eigenvectors with the eigenvalues, I think the Matlab is doing something slightly more ...
1
vote
0
answers
175
views
Stationary phase approximation for an integral with infinity saddle points?
I need a hand with the numerical evaluation, in Mathematica, for this integral:
$$f(t)=\int_{-\infty}^\infty Exp\{it(\omega_H-\omega_l-\omega_k) - \sum _{j\neq(l,k)} S_j [1-e^{-it\omega_j}]\}\, dt$$
...
2
votes
1
answer
382
views
A programming model for Quantum Mechanics angular momenta in Mathematica
I'm writing prototypes for solving the Liouville Equations with Mathematica and C++. Perhaps the question about this may not be suited for this forum in a strict way, but it suits the people here ...
1
vote
0
answers
60
views
Malliavin Derivative with Mathematica is it possible? [closed]
From mathematica.stackexchange:
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 $$F=F(\...
5
votes
1
answer
3k
views
Laplace's equation problem in Polar Coordinates (Edit)
Is there public code in Matlab for solving the Laplace equation in polar coordinates in a circular domain?
I tried a lot but my level of Matlab and Mathematica is not good enough, but still not ...
7
votes
2
answers
577
views
Numerical Green functions for a nonlinear wave equation
I am trying to put down some code to get numerically the solution of the following PDE:
$$
\partial^2_t\phi-\partial^2_x\phi+\lambda\phi^3=\delta(x)\delta(t).
$$
Of course, there are several ...
3
votes
2
answers
368
views
Numerical solution of fractional integro-diffrential equ. using collocation method?
problem comes from
"Numerical solution of fractional integro-differential , equations by collocation method , E.A. Rawashdeh, Department of Mathematics, Yarmouk University, Irbid 21110, Jordan"
$D^...
5
votes
3
answers
10k
views
Solving two coupled non-linear second order differential equations numerically
I have encountered the following system of differential equations in lagrangian mechanics. Can you suggest a numerical method, with relevant links and references on how can I solve it, and the ...
4
votes
2
answers
2k
views
Implementing a finite difference method in Mathematica
I am trying to iterate the following equation
$$
x_{k}(n+1)=x_k (n)-\epsilon (x_{k+1}(n)-2x_k(n) +x_{k-1}(n))+\sqrt{\epsilon}\; \eta_{k}(n)
$$
where $n$ denotes which time step I'm on and $k$ is the ...
4
votes
1
answer
81
views
Migdal Recursion and Mathematica
I am studying $SU(2)$ lattice field theory, and I am attempting to use migdal recursion for renormalization.
The main equation for Migdal recursion for my case is
$$e^{-S_p(U,\lambda a)}=\left[ \...
2
votes
2
answers
46
views
The region of allowed values for solving the equation in Mathematica
In[2]:= Solve[sqrt(2x-9) == sqrt(4x+3), x]
Out[2]= {{x -> -6}}
But mathematically there is no solution, since sqrt (-21) is not defined. There is a flag that ...
12
votes
1
answer
871
views
Replacing Mathematica's QuasiMonteCarlo integration in C++
I have a Mathematica program which performs some integrals in 3 or 4 dimensions using the QuasiMonteCarlo method. The problem is, it takes an annoyingly long time ...