instruction stringlengths 43 28.1k |
|---|
I wish to minimize the quantity $$W=1/2x^TAx-x^Tg(y)$$ with respect to $x$ and $y$, which are vectors of unknowns. $A$ is a sparse square symmetric positive definite matrix and $g(y)$ is a vector with non-linear dependence on $y$. Everything is real-valued.
Finding $x$ given $y$ is straight forward:
$$Ax-g=0$$
$$x=A^{-... |
What are the practical differences between a Galerkin finite element method vs an orthogonal collocation method? The best reference I've found thus far as been a paper titled The Performance of the Collocation and Galerkin Methods with Hermite Bi-Cubics by Dyksen, Houstis, Lynch, and Rice. To me, it seems like:
When... |
I am trying to solve the set of equations posted here- Solving the heat diffusion equation with source term
One of the methods I have learnt to solve second order PDEs is the 'method of lines', where we discretize all independent variables except one. So for this example, I can discretize the spatial domain as follows-... |
Let's say I have a bag of marbles. Each marble has several attributes (color, diameter, surface roughness, weight).
I know that there is a statistical relationship between various marble attributes and weight. I am trying to optimize for the weight distribution (either maximize/minimize the mean or the variance) by onl... |
As a little summer project I have tried to make a ballistic calculator for when I play football, (following an example from a book),
just to learn some numerical methods while doing so.
My problem is that I cant seem to find much on the Runge-Kutta 5 method (method recommended) for systems of second order differential ... |
I have read an article talking about binary clustering using Matrix factorization(see attached), but i would like to understand some optimization concepts:
Is it reasonable to use a Frobenius norm in such optimization?
What does it mean the centroid constraint: C^T*1=0, and why it is equivalent to K-means especially i... |
I have a function like this
void foo(x, *y) {
some calculations
if (x > *y) {
*y = x/2;
}
more calculations
}
My parallel section is
int x[] = some array;
double y=0;
#pragma omp parallel for
for ( int i = 0; i<=n; i++) {
do something
for ( int j = 0; j<=n; j++) {
foo(x[i... |
I am trying to solve the coupled PDE system given here-Solve System of PDEs, using the method of lines and the ode15s command. Referring to variables $u1$ and $u2$ as $u$ and $v$ respectively, I have discretized the x domain as-
$$\frac{\partial^2 u}{\partial x^2} = \frac{u_{i+1}-2u_i+u_{i-1}}{(\Delta x)^2} \hspace{10p... |
I was checking some integration methods provided by SciPy, in which the DOP853 should be included according to the webpage (https://docs.scipy.org/doc/scipy/reference/generated/scipy.integrate.solve_ivp.html#scipy.integrate.solve_ivp).
However, unlike others, DOP853 does not work and the following message appears:
~/an... |
In several optimization problems, we found what we called the balanced constraint(c^T • x = z )
For exp: C^T • 1 = 0 (C is a binary Matrix)
Can I have an intuitive explanation about the concept and how it is balanced?
|
My post is structured in four parts:
I give you some information about the context my principal questions refer to.
I will tell you what I believe to know about the Thomas Algorithm. If I am wrong in any regards, correct me please.
I suggest two approaches on how to implement time stepping for the heating process.
... |
I am working in an application in which I need to calculate the surface area of a superellipsoid. I have read that there is no closed form solution (see here), so I am trying to compute it using numerical integration. The problem is that I am finding different results using different numerical integration methods, whic... |
I am trying to solve the non-linear parabolic PDE in $c(t,r)$
$$c_t=\frac{1}{r}(rDc_r-\alpha r^2 c)_r$$
with initial condition $c(0,r)=f(r)$
and boundary conditions $c_r(t,r_1)=\alpha r_1c_1/D$ and $c_r(t,r_n)=\alpha r_nc_n/D$; in other words, there is no flux across the boundaries.
This the Lamm equation, a 1-dimensi... |
Following this question, for the code below (from MS OpenMP docs example)
// omp_critical.cpp
// compile with: /openmp
#include <omp.h>
#include <stdio.h>
#include <stdlib.h>
#define SIZE 10
int main()
{
int i;
int max;
int a[SIZE];
for (i = 0; i < SIZE; i++)
{
a[i] = rand();
prin... |
Following the latest trends in linear algebra, power consumption is quickly becoming an important factor to consider when designing and using an algorithm.
I've even heard that over time, the electricity bill can exceed the initial purchasing cost of a supercomputer and people predict that in the future, HPC resources ... |
I'm having an issue with the easiest example of a nonlinear 1D PDE, the (inviscid) burgers' equation:
$u_t + uu_x = 0,~~(1)$
which can be rewritten as some convection equation
$u_t + f(u)_x = 0$
with flux $f(u) = (\frac{u}{2})^2$. I use a semidiscrete method to solve (1) with periodic boundary conditions: I use upwindi... |
There have been many papers quoting FLOP to quote the performance of a specific approach in machine learning. For example,
We trained two models with different capacities: BlazePose Full (6.9 MFlop, 3.5M Params) and BlazePose Lite (2.7 MFlop, 1.3M Params).
I assume they measured the number of Mega FLOP needed to run ... |
In term of the mathematical distance measurement,
What is the significance of a Frobenius norm for a binary matrix?
|
I currently have created a model airplane in Blender by drawing a closed volume with triangular planes. I want to do a FEM calculation on this object, meaning I need a fine 3D tetrahedral mesh of this structure. I have looked at threads like (Creating 3D Mesh from stl files with gmsh) which seems similar, but having en... |
I shall try to get to the point, so let me know if there is something left and you need more details.
I am solving a couple of equations that are not coupled explicitly, but their corresponding unknown variables, say $x$ and $y$ must satisfy a differential equation:
$\dot x = x + y,$
where dots denote derivative with r... |
I am trying to solve the Poisson equation in 2D for heterostructure devices. I have linearized the equation and discretized it using FDM. I am using BiCGStab to iteratively solve for the solution as follows:
Step 1: Solve $A^{(i-1)} x^{(i)} = b^{(i-1)}$ for $i = 1,\dots,N$ where convergence is reached
Step 2: Use $x^{i... |
I know sine is $2\pi$-periodic, but some people say the motion is "periodic in..."
Would it be periodic in $y$?
If we move along the $x$-axis, the function values $y = \sin(x)$ will repeat, so I think it's "periodic in $y$".
Is this correct?
|
Say a system of ODEs describing a dynamical system, with solutions/state-space vectors ($x$, $y$, $\theta$).
If values of $y$ and $\theta$ repeat but values of $x$ do not, would I say that the solutions are periodic in $y$ and theta but not in $x$?
I'm confusing this with a simple periodic sine function, I think.
|
Is there a simple algorithm to determine if a given polynomial (with all real coefficients) has all real roots? I do not need to know what the roots are; I just what to know if a given polynomial has any complex roots.
Background: I am aware that there are algorithms (for example see here) to compute all of the real ro... |
Mixed FE formulations with LBB-stable elements require two different meshes for the primary and the constraint variables, for example, displacement and pressure. With continuous approximation for the pressure field, I am finding it difficult to parallelise for distributed memory architectures.
I am interested in learni... |
I would like to store text data (matrix with numbers and letters) in a light way (light volume for easy exchange, and light to open it).
Question: are binary files lighter than txt? is it always true? And why?
|
If I make a quasi-steady assumption in a model such as keeping the fluid density constant and assuming the flow is incompressible, does modeling a flow with decreasing velocity / magnitude, say, as the flow moves from left to right, violate conservation of mass? If so, why?
|
The problem I have at hand is a regression problem where each of $p$ inputs, $x_1, x_2, x_3, \cdots, x_p$, needs to undergo a variable transformation using one of $q$ basis functions from a set of available functions $F = \{ f_1, f_2, f_3, \cdots, f_q \}$. The cost function is the Mean Square Error (MSE) defined as $MS... |
In many situations in unstructured mesh solvers, one needs to compute gradient of arbitrary variable $\phi$ such as temperature or velocity at face centers (one of such situations is correction for mesh non-orthogonality), which can be approximated as:
$$ \nabla \phi_f = (g_C \ \nabla \phi_C) + (g_F \ \nabla \phi_F)$$
... |
Using the Hamiltonian for a test particle in Kerr spacetime, we arrive at the following equations for generalized position and momenta (in natural units, $G = c = M = 1$):
\begin{align}
\dot{r} &= \frac{\Delta}{\Sigma}p_r\\
\dot{\theta} &= \frac{1}{\Sigma}p_\theta\\
\dot{\phi} &= \frac{1}{\Sigma\Delta}\left(2arE + (\Si... |
Are there any good, easy to use, software for simulating the evolution of systems of generic differential equations? I know there are custom programs for various specific circumstances (such as electrodynamics). But say I have some equations and I quickly want to simulate the evolution of some initial state; without re... |
I am writing a program in python that is supposed to calculate the magnetic field along a conducting coil that is made up of a bunch of points, and the magnetic field is generated by other conducting coils which were made by rotating the points that make up the original conducting coil. I have tried doing this using Bi... |
Suppose $n$ inputs ($x_1, x_2, x_3, \cdots, x_n$) can take on any of $m$ values, say $\{ k_1, k_2, k_3, \cdots, k_m \}$, and that there is a cost function $y = f(x_1, x_2, x_3, \cdots, x_n)$. For instance, for $n = 3$ ($x_1, x_2, x_3$) and $m = 2$ ($\{ k_1, k_2 \}$) we have a total of $8$ possible triplets $S = \{ (k_1... |
I have a question about my code which computes numerically the output field of a 4f setup with a pinhole in the middle which works as a spatial filter.
My setup consists of two lenses with 50mm focal length (distance 2f), and a pinhole between both lenses. The input field has a Gaussian field distribution, where the Ga... |
After using ode45 to solve a set of ODEs, I want to write a Matlab function to take the initial conditions x_0 as inputs and gives the final state x_1 at time T as the output, thus creating a discrete dynamical system f.
However, I'm having some trouble writing the function that would embed the initial conditions, the ... |
The runtime of Gaussian elimination on an $n \times n$ matrix is $O(n^3)$. What is the runtime on an $m \times n$ matrix?
I am taking Gaussian elimination to mean putting the matrix in reduced row echelon form. (Although I'm guessing there is no complexity difference between reduced row echelon form and just row echelo... |
In the standard formulation of Krylov subspace methods, you always have to divide by 0 somewhere in a solution, e.g., in CG,
$$
x_{k+1} = x_k + \frac{r_k^T r_k}{p_k^T A p_k} p_k\\
p_{k+1} = r_{k+1} + \frac{r^T_{k+1} r_{k+1}}{r^T_k r_k} p_k
$$
(Normally, of course, you never get there because the stopping criterion hits... |
Consider the advection equation
$$\frac{\partial u}{\partial t}+c(x)\frac{\partial u}{\partial x}=0.$$
With periodic boundary condtitions in $x$ with period $L$, i.e. $u(x,t)=u(x+L,t)$ and initial condition $u(x,0)=f(x)$.
We can solve this numerically by discretizing in $x$ to get a set of ODEs in $t$. Let
$$u_i(t)=u(x... |
I am wondering if there is a well-known transformation allowing one to solve convex optimization problems of the form
$$\begin{array}{ll} \underset{x}{\text{maximize}} & r^T x\\ \text{subject to} & \mathbf{1}^T x + \displaystyle\sum_i f_i\left(x_i\right) \leq 0\end{array}$$
where the penalty consists of convex losses
$... |
Many grants require an official record be kept of day-to-day research activities. For experimental research groups, this is often accomplished with a bound paper notebook in which the experimental details, troubles, and possibly a few key results can be written (or sometimes even printed off and taped in).
Some electro... |
I was using an edge (vector) finite element to solve electromagnetic diffusion (two-dimensional cases). The element that I used was a triangular element. I have got the result of the finite element in each edges element of the triangular element. But I don't know how to extract the value interior the triangular element... |
I have been performing convection-diffusion transport studies on microfluidic channels like the following
The inlet concentration is specific and I obtain the time-dependent concentration profiles of the
solute at the discretization nodes in the domain. Using this data, I would like to know how to compute the time sca... |
Suppose I have a correlation matrix, $A$, and I already have the eigenvalues and eigenvectors of this matrix.
For a given vector, $\mathbf{\mathit{v}}$, I want to calculate the eigenvalues and eigenvectors of the following new matrices:
$$A+\mathbf{\mathit{v}}\mathbf{\mathit{v}}^T\textrm{ and }A-\mathbf{\mathit{v}}\mat... |
My problem is a little more complex, but here is a simplified similar model.
Let us consider a fire source inside a box and the hot gases (burnt or unburnt) from the combustion are going out of the exhaust (white surface) at a certain velocity. We have the velocity field of the entire domain and can be visualized usin... |
I'm trying to add a colour to the LogicalVolume which has been renamed to TrackerLogical in Geant4. I get the error that fVisAttributes and visAttributes are undefined although I have defined them in the #include section as .hh files.
The primary framework I have used is that of exampleB1 and I am trying to add color u... |
When using no flux Neumann boundary conditions (i.e. zero derivative to the normal on the boundary) in a non-stationary PDE, I don't seem to recognize the difference to using Dirichlet boundary conditions directly...
Since the initial values prescribe the values that the boundary has to take at $T = 0$ and we impose th... |
I am trying to figure out how to implement a solver for a system of nonlinear equations of the form
\begin{align*}
u_1 &= y_n + h\left(a_{1,1}f(t_n + c_1 h, u_1) + a_{1,2}f(t_n + c_2 h, u_2)\right) \\
u_2 &= y_n + h\left(a_{2,1}f(t_n + c_1 h, u_1) + a_{2,2}f(t_n + c_2 h, u_2)\right)
\end{align*}
where $f: \math... |
I need a check on the following exercise about weak formulations and finite elements.
Consider the advection diffusion system
$$
\begin{cases}
-(\mu u')' + \beta u' + \gamma u = f \\
u(a)=0 \\
u(b) = g_b
\end{cases}$$
where $\mu,\beta \beta', \gamma \in C^{0}([a,b])$ and $f \in L^2(a,b)$
Write the weak formulation, sp... |
Suppose that we have coordinates $u=u(x,y)$ and $v=v(x,y)$ in $\mathbb{R}^2$ so that $v$ is not differentiable when $u(x,y)=u_0$ where $u_0$ is a constant. Can we solve a differential equation, such as the Schrödinger equation, using these coordinates? Can we compute integrals involving the Jacobian determinant in thes... |
Edit: So I was able to get the same value of r that's given, when coding up the sum of squares of function values directly in the script file, rather than on the Command Window. So, maybe there's a round-off error from doing it manually. Thanks.
I'm learning multivariable root finding, starting with some simple sets ... |
I'm writing a code for solving PDEs through the finite element method. In particular, I'm facing with 3D problems, in which I don't know how to calculate shape functions derivatives on the boundaries (3D triangular elements).
In the 2D triangle, the conversion from local to global shape functions derivatives is done th... |
I'm struggling with the following problem:
What is the maximum degree of exactness that we can obtain with the following quadrature >formula
$$\int_0^1 f(x)\frac{1}{\sqrt{x}}dx \approx w_0 f(x_0) + w_1 f(x_1)$$
Compute weights and nodes
I should use some theorem, but I can't understand which one! Also, I think that t... |
I'm interested in a type of problem on this form
$$\min_{x} x^{T}Ax+x^{T}b \quad \text{s.t} \quad x^{T}x=1 $$
where $A$ is positive definite. As you can see, if it weren't for the $x^{T}b$ term in the objective, this would be equivalent to finding the eigenvector with the smallest eigenvalue of $A$
This problem becomes... |
I have the element stiffness matrix for a thin "kirchhoff" plate. The plate is 3 [m] x 5 [m] and is simply supported on all edges. It's thickness is 0,2 [m]. On the plate there acts a constant load p = 5 [kN/m²]. For mu = 0,2 and E = 30000 [MPa] the displacement in the midpoint equals 0,168 [mm].
What's the most effici... |
Looking for advice on discretization (preferably finite difference) schemes for pdes on curves in general, but in this case it is an ellipse (so given by $(a\cos(r), b\sin(r)$). The problem is the advection equation
$$\frac{ \partial u_s}{\partial t}+ \frac{ \partial u_s}{\partial s}=0,$$
with $s$ corresponding to arc ... |
I need to compute the Singular Value Decomposition (SVD) of many $4 \times 4$ matrices. I'm looking for SVD algorithms specialized for small matrices. I've read that the std::vector sorting algorithm in the C++ STL is often hardcoded for short vectors for optimal performance. I want to hard code the SVD for the case $4... |
I have a system of ODEs for functions $f_i(t)$. At each time $t$, $f_i(t)$ is the position of particle $i$. The functions $f_i$ have a monotonicity property: at all times $0 < f_1(t) < f_2(t) < \dots < f_n(t)$. This property is preserved by the true dynamics, since there is a divergent repulsive term in the ODEs when a... |
Generally, we know that if we have this relation between Fourier transforms of three functions in frequency domain as:
$$\mathfrak{F}\{\mathsf{P}(t)\} = \mathfrak{F}\{\mathsf{Z}(t)\}\mathfrak{F}\{\mathsf{Q}(t)\}$$
We should have this relationship in the time domain as:
$$\mathsf{P}(t) = \int \mathsf{Z}(\tau) \mathsf{Q}... |
I am new in the GPUs world, I used them in Matlab ambient so I didn't need to appreciate the subtleties of these devices.
I know that a GPU can be divided into multiprocessors (also called Streaming Multiprocessors) whose single processors share a cache memory. I don't understand if the host is required for the communi... |
I have a doubt regarding the signal of the dissipative term in a finite difference solution for an equation of the form
$$
\frac{\partial u}{\partial x}+f(x)=0, u(0)=0
$$
In which $f$ is an odd function and the solution (judging by the modelled phoenomena) should be an even function in a symmetric domain (say, $D=[-1; ... |
For exploratory work related to special function implementations, I need to compute $\log \frac{\sin y}{\sin x} $, where $0 \le x \le y \le 2x < \frac{\pi}{2}$. Cases with $x \approx y$ in particular are critical to overall accuracy.
Given that the ratio of the sines is often close to unity, I want to use the log1p fun... |
I have been reading on different techniques used to reorder sparse matrices to achieve better performance, the most popular being the Cuthill-McKee or Reverse Cuthill-McKee algorithm. Most of those techniques focus on reducing the bandwidth of the matrix, which is defined as the furthest distance of a non-zero entry fr... |
Assume that you have two linear maps $A$ and $V$. For a given $x$ (of appropriate dimension) you can compute $Ax$ numerically, and for any $y$ (of appropriate dimension) you can calculate $V^Ty$ numerically. But you do not have access to both $A^Ty$ and $Vx$ on your computer. Hence, you can compute things like $$\langl... |
I have been unable to find the equivalent of the 5-point stencil finite differences for the Laplacian operator.
In 2 dimensions for me it is clear that, using the finite difference method: $$
\nabla_{2D}^2u = \frac{1}{h^2} \left( u_{1,0} + u_{-1,0} + u_{0,1} + u_{0,-1} -4 u_{0,0} \right)
$$
(h being the size grid/step... |
New to Computational Science, I hope I'm on the right exchange network for this question.
I have a time series data set that contains the sum of a source data set representing an exponential decay curve at discrete points in time. In other words, the time series data set is the integral over discrete time bins. An exam... |
In the Computational Materials Science: An Introduction by June Lee, he discusses molecular dynamics and density functional theory with examples from LAMMPS and QuantumEspresso, and explains LAMMPS and QuantumEspresso in detail.
I was wondering if there is a similar text in Computational Biology for molecular dynamics ... |
I always see Finite Element codes solving PDE with Dirichlet or Neumann boundary conditions. But, I have a problem now consisting of a straight cylinder with a circular base (a simple 3D tube), with inflow and outflow given by a pressure variation (for example, $p_\textrm{inflow}=20$ at the left circular "cap" and $p_\... |
I'm trying to learn COMSOL for a graduate research project and am struggling through a flow and transport in 3D tutorial. As such I'm walking through my boundary conditions and trying to figure out if I can find something that is wrong in my model.
I noticed that a cylinder, which I've assigned to be a well is treated ... |
I need transfinite mesh a small section of the bolt hole to insert a crack. However, The transfinite mesh and regular full quad mesh seem being incompatible and throwing errors. How can I combine transfinite quad and regular full quad meshes in the following geo file?
I used the following meshing options:
Packing of p... |
I'm studying periodic motions in a dynamical system and, as a newbie, I narrowly think of an object's periodicity in its spatial x-y coordinates, but what might be a good reason why the existence of periodicity in its velocities xdot and ydot is important too? I tend to think that so long as the object's spatial x and ... |
I have a real-valued linear system $Hx = b$ where $H$ is symmetric matrix** (not necessarily positive/negative definite) with a very particular structure:
$$
H = \begin{bmatrix} D && B \\ B^T && A\end{bmatrix}
$$
Where:
$A$ is dense with a small fixed dimension (e.g. 3x3)
$D$ is diagonal with a (relatively) large dime... |
[Relatively new to Petsc] I am writing an object oriented project and my idea is to have parallel objects when the user constructs the object with MPI arguments. So have member data Mat and fill/assembly it in the constructor. Though I am struggling doing this correctly so that's my first question (see below the code. ... |
The function JacobiSVD and BDCSVD can calcuate condtion number of a dense matrix via singular values.
However I need to know condition number of a sparese matrix due to slow computation speed using iterative linear solver. I can't find such function. If the sparse matrix is converted to one dense one in advance, the me... |
I want to solve with linear finite elements the equation $$\partial_t u = \partial_{x}(a(u)\partial_xu)$$
in the domain $t \in [0,1]$ and $x \in [-L,L]$. Here $a(u)$ is just a function of $u$.
Applying the weak formulation with $u(t,x)=\sum_{j} u_j(t) \varphi_j(x)$, I obtain $$\partial_t u_j(t) \int_{-L}^{L}\varphi_i(x... |
I am working on a numerical model to simulate the acoustic and elastic wave propagation in frequency domain via the Finite Element Method. Basically, the problem is to solve the Helmholtz equation in the fluid domain, the Navier-Cauchy equation in the solid domain and a couple of interface conditions.
More precisely, t... |
Recently, I've been reading up on various root-finding / optimization algorithms such as the Levenberg-Marquardt method, Gauss-Newton, Conjugate Gradient, trust-region and trust-region-dogleg.
I've then been practicing using Matlab's fsolve function for some easy problems such as solving g (g(1), g(2)) = (0,0), where g... |
Suppose that I have a linear system $Ax=b$ such that $A$ is ill-conditioned. Can I say that it is dangerous to find a solution with Gaussian Elimination for this system, or does there exist some class of pivoting that allows me to find a good solution?
Does the Vandermonde Matrix have something special to do with this ... |
I'm looking to solve numerically the following equation for $(d,d)$ variable $X$, in Einstein summation notation
$$M_{ijkl}X_{kl}=N_{ij}$$
Where $M$ is a $(d,d,d,d)$ 4th-moment tensor of random variable $(a,b)$ and admits representation in terms of 2nd and 1st moment tensors based on the Isserlis theorem
$$M_{ijkl}=E[a... |
I'm looking at Murray's book: Mathematical biology: an introduction , first volume, pag. 404
In particular, I'm interested to solve the following PDE:
$$\partial_t u = \partial_x (\text{sign}(x) u) + \partial_x (u^2\partial_x u)$$
and I chose as initial condition $u_0(x)=e^{-x^2}$ and boundary conditions $u(-L,t)=u(L,t... |
I am trying to solve :
$$-u''(x) + u(x) = \sin(2\pi x)\, ,\quad 0<x<1\, ,$$
$t>0$,
with $u(0) = u(1) = 0$. That has as exact solution
$$u(x) = \frac{\sin(2\pi x)}{1 + 4\pi^2}\, .$$
But the Forward Euler approximation solution does not match the exact solution.
Any help?
import numpy as np
import matplotlib.pyplot as pl... |
I'm currently doing some practice problems on root-finding and am writing up some notes / comments on my code. In my solver code, if my function value is below the tolerance that I've set, should I write,
"the function converged to a root, since the function evaluation is below the function tolerance"
or
"the function... |
My FEM scheme uses a 4-node quadrilateral element with bilinear shape functions. The simple problem I'm solving is. $\nabla ^2 f = 5$ But as I increase the number of nodes, the plot of the solution becomes flatter. I'm stumped as to why this might happen.Two plots below show how when I change the size of the mesh from ... |
I have a 3D diffusion equation that I want to solve using a time splitting (2D+1D). Assume that $A$ is the 2D discrete diffusion operator and $B$ is the 1D discrete diffusion operator.
I want to use a STRANG splitting to ensure a global 2nd order of precision :
\begin{equation}
\frac{\partial f}{\partial t}=\frac{1}{2}... |
I have the following formula that I need to rewrite in order to avoid catastrophic cancellation.
$$y =\sqrt{\frac{1}{2}\left(1-\sqrt{1-x^{2}}\right)}$$
As $x$ becomes smaller, $\sqrt{1-x^{2}}$ approaches $1$, so you will get $1 - 1.000000000......1$ which will result in a catastrophic cancellation. I tried to rewrite t... |
I need to solve with linear finite elements the equation $$\frac{\partial }{\partial x}\Bigl(\text{sgn}(x) u \Big) +\frac{\partial}{\partial x} \Bigl[ \sqrt{u} \frac{\partial u}{\partial x} \Bigr] =0$$
with boundary conditions $u(-L)=u(L)=0$ where $L=6$
(It's the steady state version of the equation described here: No... |
I'm trying to code up in Matlab a multivariable Newton's method, for a mapping from R^2 to R, but the Jacobian would be a 2x1 matrix, not square, so it wouldn't be invertible.
Does this mean that Newton's method can't be used for root-finding, when mappings are from R^2 to R?
Would I then need to implement a derivative... |
(Crossposted on cstheory.SE)
When is it easy to invert a sparse matrix? Specifically, I'm wondering about the cases in which matrix inversion has similar cost to sparse matrix multiplication, hence much lower cost than full matrix inversion.
If the pattern of non-zeros corresponds to a bounded tree-width graph, exact i... |
What would happen if I wrote a finite-difference code evaluated at a point where the function isn't differentiable analytically?
I'm trying to think analytically vs numerically.
Thanks,
|
For example I have an equation that goes something like
$
\partial_t \rho = -\nabla\cdot (\rho u) + \nabla \cdot(D(\rho, T) \nabla \rho) + \rho_s
$
($\rho, \rho_s, u, T$ are coupled with a few other PDEs)
Could I use Forward Euler to approximate the future $\rho$ and $T$ to estimate the future coefficients and then pl... |
I'm coding up a simple model for gradient-descent, and using it to minimize some simple, deterministic functions.
What step size could I choose that's simple enough for me to get started with?
Should I choose a constant step size of .1? .001? 1? 1.5?
On Wikipedia, it gives a model for this step size, called the Barz... |
I'm new in this community. I moved this question from Math community. I'm reading the following article
Article Here
and my target is to replicate the results for a project.
SEIRU Model: I obtained very nice results though I not used article data but my data. Here is the evolution image I obtained playing around with ... |
I'm implementing the Finite Different 2nd and 3rd derivatives in my research and naturally I'm looking for the most efficient approach.
From https://en.wikipedia.org/wiki/Finite_difference#cite_ref-WilmottHowison1995_1-0 I found a more efficient formula that takes 2 function evaluations out of the picture. But I'm not ... |
Suppose I want to solve a linear inverse problem. In this example we take a convolution with the kernel:
$$\frac{1}{(y^2+z^2)^{3/2}}$$
We only take a fixed $z$ for the computation and convolve with respect to $y$. The associated matrix $A$ is dependent on $z$, denoted as $A_z$.
The output vector $b$ is (spatially) loca... |
The price of a commodity can be described by the Schwartz mean reverting SDE
$$dS = \alpha(\mu-\log S)Sdt + \sigma S dW, \qquad \begin{array}.W = \text{ Standard Brownian motion} \\ \alpha = \text{ strength of mean reversion}\end{array}$$
From it is possible to derive the PDE for the price of the forward contract havin... |
(cross-posted on crossvalidated)
For random variable $(x,y)$ in $\mathbb{R}^{d}\times \mathbb{R}^{d}$ and vector $v \in \mathbb{R}^d$, I need to perform the following matrix vector multiplication.
$$T(v)=E[xy']v$$
The issue is that the expected matrix $E[xy']$ is too large to represent in memory ($d\approx $1 million),... |
I'm trying to solve the non-linear Poisson equation as a first step to solve the drift-diffusion equations for semiconductors. For reference, I'm using a preprint from the Weierstrass Institut (which I will refer to as [W]) that can be found here. All the model parameters and equations can be found there. I'll make ref... |
Most computational methods for solving PDEs are grid-based. What makes a computational grid "good", other than being sufficiently fine to resolve features of numerical solutions? Are grids with more or less equal size cells better than those with strongly varying grid cell size? Are grids with more "rounded" cells bett... |
I have a doubt on the project I'm working now.
Actually I want only customer voice from the recordings which contains customer-agent conversation.But I have no idea to filter customer voice from customer - agent voice recording.
Could someone please share your ideas on this ?
|
I need to apply a 1D type-II DCT (Discrete Cosine Transform) to each column of a matrix while normalizing the result in C++. Effectively, I want to multiply my matrix with an orthogonal type-II DCT-matrix (while avoiding the performance cost of matrix multiplication, of course).
Since this seems like an important compu... |
I have implemented the Remez algorithm in Python where all calculations were done with the Python mpmath library. I have noticed that sometimes the $|E_{max}|$ and $|E_{min}|$ do not monotonically increase anymore but recurrently iterate over the same values. Mainly, my stopping condition $|E_{max}| - |E_{min}| < u$ wh... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.