Questions tagged [numerical-methods]

Questions on numerical methods; methods for approximately solving various problems that often do not admit exact solutions. Such problems can be in various fields. Numerical methods provide a way to solve problems quickly and easily compared to analytic solutions.

Filter by
Sorted by
Tagged with
0 votes
0 answers
30 views

Using sympy to solve a very complicated equation

I have given an equation as, g1 = (0.0783*(x*h0**2)**(-0.238)) / (1 + 39.5*(x*h0**2)**(0.763)) ...
user avatar
  • 420
0 votes
0 answers
45 views

How to do backward error analysis of $Ax=b$?

I know the definition of forward error, backward error and condition number. The following is a backward error analysis I think. Let $A$ be a square matrix of order $n$ and $\hat{x}$ be a approximate ...
user avatar
  • 31
-5 votes
0 answers
20 views

Mathematica code for soliton structure [closed]

I need to plot the solution of KdV equation in Mathematica. Anyone expert here? [Lambda] = Sqrt[2 (1 + [Beta][Mu])/([Alpha](q + 1))] [Alpha] = 0.1 [Beta] = 0.4 q = 2 [Mu] = 1 u = 0.1 A = B*(3*(4 - 4*[...
user avatar
0 votes
0 answers
10 views

Proving bounded properties of a dynamical equation

Let the energy functional for $u(x,t) \in \mathbb{R}(x \in[0,1])$ be given as $$ E[u]=\int_{0}^{1}\left[\frac{1}{2}\left|\partial_{x} u(x)\right|^{2}+\frac{1}{4 \varepsilon^{2}}\left(1-|u|^{2}\right)^{...
user avatar
  • 914
0 votes
0 answers
21 views

Difference between approximate inside and outside first for second order finite difference and how to do it

I want to apply a forward finite difference to the following term $$\frac{\partial}{\partial x}(a\frac{\partial p}{\partial x})$$ If I approximate the inside derivative first $$\frac{\partial}{\...
user avatar
5 votes
1 answer
64 views

Approximating $\sum_{p\in\Bbb P} \frac1{p\ln p}$

It's known that the sum $$\sum_{p\in\Bbb P} \frac1{p\ln p} \approx 1.6366$$ converges approximately to the indicated value, see here for example. How is this approximation calculated? The series ...
user avatar
0 votes
0 answers
17 views

Solving the time required for two particles to move to a specified distance in two-dimensional space

Now there are two particles $j^{th}$ and $i^{th}$, Their coordinates are $\mathbf{r}_j (1.0, 0.0)$, $ \mathbf{r}_i (3.0, 1.0)$ respectively. Their speed $\mathbf{v}_j (-0.3, 0.0)$, $ \mathbf{v}_i (-0....
user avatar
-2 votes
1 answer
43 views

Solving $\sin(xy)+\frac{\sin(x)\cos(xy)}{\cos(x)}=0$ for $x$ and $y$ [closed]

How to solve(determine the roots $x$ and $y$) the given nonlinear equation? What could be the best numerical approach for solving the mentioned equation? $$\sin(xy)+\frac{\sin(x)\cos(xy)}{\cos(x)}=0$$
user avatar
  • 7
2 votes
1 answer
54 views

Finding solutions of $\sum a_i = \prod a_i = n$ in $\{a \in \mathbb{Q} \mid 100a \in \mathbb{Z}^+\}$

Problem: Define the set $Q_p := \{a \in \mathbb{Q} \mid 100a \in \mathbb{Z}^+ \}$. Given an integer $k$ and some $n \in Q_p$, find $a = \{a_1, a_2, \cdots a_k\} \subset Q_p$ such that $$\sum_{i=1}^k ...
user avatar
  • 1,385
2 votes
0 answers
21 views

Hermite interpolation - I have an answer, but don't know why does it actualy work.

I was asked to use Hermite Interpolation to find an interpolating polynomial of a degree at most $5$ that satisfies the conditions: $x = 0$ $x = 1$ $ x= 3$ $f(x) = $ $1$ $3$ $1$ $f'(x) = $ $0$ $3$ ...
user avatar
  • 145
1 vote
1 answer
51 views

What numerical scheme could I use to solve this integral equation?

I have the following equation which I would like to solve numerically (python) but I am not sure what scheme could be used. Any suggestions? $$\phi_{2} = \int_{0}^{^{\phi_{1}}} \frac{r_{1}(\phi_{1})}{...
user avatar
-2 votes
1 answer
40 views

Is It Possible to Use Gradient Methods Without Gradient

If the gradient is unavailable, are there gradient methods that can approximate it? (Due to complexities, the gradient cannot be computed. I'm developing a toolkit for general optimization, and not ...
user avatar
1 vote
0 answers
33 views

Non-linear Integro-Differential equation

I encountered the following integro-differential equation attempting to solve a system of PDEs: $$ \frac{\partial c}{\partial t} = D \frac{\partial^2 c}{\partial x^2} - a c \exp\left(-b\int_0^t c dt\...
user avatar
  • 11
0 votes
0 answers
19 views

Integral inequality of cubic spline interpolation

Let $f \in C^2([a, b], \mathbb{R})$, $a = x_0 < \ldots < x_n = b$ with $n \in \mathbb{N}$ being a subdivision of $[a, b]$, and $s$ an interpolated cubic spline to $f$ and the knots $x_0, \ldots, ...
user avatar
0 votes
0 answers
15 views

Solver consistency for matrix ODE

Consider the matrix differential equation in PSD matrix $X \in \mathbb{R}^{N \times N}$ $$\dot X(t) = X(t) F(X(t))^T + F(X(t))X(t),$$ where $F(X):\mathbb{R}^{N \times N} \to \mathbb{R}^{N \times N}$ ...
user avatar
0 votes
1 answer
24 views

What is the difference between it and what is the best approximation

I studied numerical analysis at university and came across this type of formula. I know these formulas use approximation, given the data we have in the table. My question is, what is the difference ...
user avatar
  • 318
1 vote
1 answer
50 views

Convergence plot for ODEs with no exact solution

To analyze a numerical method for an ODE, we can create a loglog plot of the error versus the stepsize, and the slope of that curve is the order of the method. The error is is the norm of the ...
user avatar
0 votes
0 answers
47 views

possible set of solutions for $\cos(\alpha) = a, \sin(\alpha) = b$

There are infinite possible solutions for $\alpha$ in the following system: $\cos(\alpha) = a$ $\sin(\alpha) = b$ where $a^2 + b^2 = 1 $ is given. Can you please introduce me some numerical or ...
user avatar
0 votes
1 answer
62 views

Showing that a cube root approximation has no decrementing function/loop variant

I'm not sure if I've phrased the title correctly, but my question is about the following (Python) code that tries to approximate the cube root of some number x: <...
user avatar
  • 519
0 votes
0 answers
9 views

Condition number in norm 2 of a Jordan block

Let $J$ be an $n \times n$ Jordan block for the eigenvalue $\lambda$. We know that the condition number in norm 2 of $J$ is $\mu_2(J)= \lVert J \rVert_2 \lVert J^{-1}\rVert_2$ where $\lVert J \rVert ...
user avatar
0 votes
0 answers
20 views

Numerical Methods for Integrating Against Greens Functions

I'm currently trying to evaluate an integral of the form $$ \int dt d^3 x G(t - t',|\vec x - \vec x'|) f(t,x) $$ $G$ is a Green's function, and contains some singularities that make it seem difficult ...
user avatar
  • 215
0 votes
0 answers
24 views

Determining functional form of depth-dependent index of refraction, given transit time as a function of depth

A pair of radio receivers at known, fixed locations are placed atop a medium whose index of refraction varies as a function of depth. We may assume that this index of refraction has a known functional ...
user avatar
  • 1,337
0 votes
1 answer
68 views

How to solve equations involving reciprocal square roots of quadratics? [closed]

$$\frac{2x-8}{\:\sqrt{2x^2-16x+34}}+\frac{2x-3}{\sqrt{2x^2-6x+5}}=0$$ Is it possible to solve this equations? If yes then how?
user avatar
  • 101
0 votes
0 answers
31 views

Vectorized implementation of Runge-Kutta method

Every s-stage Runge-kutta method has coefficients that can be written as matrix $\mathbf{A} = [a_{i,j}] \in \mathbb{R}^{s\times s}$, and vectors $\mathbf{b} = [b_j] \in \mathbb{R}^{s\times 1}$ and $\...
user avatar
  • 489
0 votes
0 answers
30 views

simple way to find convergence rate of Jacobi method

Can someone please explain me how to find convergence rate here? I’ve found somewhere that the rate of Jacobi convergence is equal to the rate of convergence of a geometric progression with a ...
user avatar
  • 1
1 vote
1 answer
52 views

Neural Networks: Different Depths and Widths But Same Number of Parameters

Right now I am doing a research project investigating how the depth of a Neural Network affects its capacity to learn. In order to do this, I wanted to test different Networks with the same number of ...
user avatar
0 votes
2 answers
63 views

Estimating the value of a integral using Simpson's Rule

Problem: Find an estimate of the following integral with $n = 4$ using Simpson's rule. $$ \int_0^2 x^4 \,\, dx $$ Answer: Let $S$ be the estimate of the integral. The general formula for $S$ is $$ S = ...
user avatar
  • 3,192
0 votes
1 answer
39 views

Approximating $f(x)$ with a power series, how many terms I need to obtain $n$ significant figures of accuracy at $x=x_0$ (no computer allowed)?

Robert L. Parker in his 1994 book Geophysical Inverse Theory wrote: The definition of $\mathrm{dilog}$ $\mathrm{dilog}(1+x)=-\int_0^x\frac{\ln(1+t)}{t}dt, x\geq-1$, naturally gives rise to the power ...
user avatar
3 votes
1 answer
44 views

Explaining the stability of a numerical scheme through functional analysis

In this paper, the stability of a discretization $$L_hx=y~~~~~~~~~~~(*) $$on a continuous problem $$Lx=y~~~~~~~~~~~(**)$$ where $L\in BL(X,Y)$ and $h$ represents the mesh parameters, is given by the ...
user avatar
  • 534
0 votes
0 answers
28 views

Compare the rate of convergence of Jacobiand Gauss-Seidel method for the matrices

Compare the rate of convergence of Jacobi and Gauss-Seidel method for the matrices $$ A=\left(\begin{array}{rrr} 1 & 2 & -2 \\ 1 & 1 & 1 \\ 2 & 2 & 1 \end{array}\right), \quad ...
user avatar
0 votes
0 answers
8 views

Newmark Beta Method with Dirichlet Boundary conditions

I am using the Newmark Beta method to solve the wave equation. One of the things that is confusing for me is the case where I have a constant boundary condition. With this time integration scheme I am ...
user avatar
1 vote
1 answer
38 views

Numerical integration of a function with a singularity

I'm trying to compute numerically a function like the following: $$ F(t)=\int_{0}^{t}{\frac{f(\tau)}{\sqrt{t-\tau}}d\tau} $$ I tried to adopt the composite Simpson's rule, but the problem is that when ...
user avatar
1 vote
0 answers
24 views

Estimate the condition number in the second norm of the matrix An

Let $A_{n}$ be a matrix of size $n$ for $n \geq 1$, and a structure: $$ A_{n}=\left[\begin{array}{cccccccc} \sqrt{21} & 1 & 0 & 0 & \ldots & 0 & 0 & 0 \\ 0 & \sqrt{21} &...
user avatar
3 votes
1 answer
96 views

Solving $ y' = x+y $ with Euler's method

I was going over Euler's method for solving DE and I had an idea: Could we use it to get an exact solution to a DE by considering an infinitesimal step size? This is the main idea: if the ...
user avatar
-1 votes
0 answers
18 views

Check if growth rate is worse than quadratic?

Let's say I have collected a dataset for estimating algorithmic complexity: x, t ---- 1, 1 2, 4 3, 9 4, 16 where x is the input size and t is the elapsed time. ...
user avatar
0 votes
1 answer
60 views

Find the absolute, relative, and percentage errors if x is rounded-off to three decimal digits. Given $x = 0.005998.$

Recently, I am learning about numerical methods and I found this question in the textbook to find absolute, relative, and percentage errors if x is rounded-off to three decimal digits. Given $$x = 0....
user avatar
0 votes
1 answer
43 views

Numerical methods for $u_t+c u_x= \frac{-c}{x}u$?

I am looking for possible numerical methods to solve the PDE $$u_t+c u_x= \frac{-c}{x}u$$ for $u(x,t):\mathbb{R}\times \mathbb{R} \to \mathbb{R}$ and where $c>0$ is a constant. I am particularly ...
user avatar
-2 votes
2 answers
58 views

prove the definite Integral

Hey is anyone here who can prove that: $$\int_0^{\pi/2} \sqrt{2\sin(x)} dx = \frac{2\Gamma(\frac{3}{4})^2}{\sqrt{\pi}}$$ we haven't had the Gamma Function in our lectures. But i just want prove that ...
user avatar
0 votes
0 answers
10 views

Stability of trust region algorithm as a function of the number of free parameters

I use a trust region regression algorithm for a Least Square Minimization. I used the first two terms of the Taylor series as a model for the confidence interval, based on the usual methodology of ...
user avatar
1 vote
0 answers
24 views

Sub/superscripts convention $U_i^{n}$ in numerical PDEs vs. differential geometry

Short Version. When solving a time-stepping 1D PDE, should I store solution $U_i^n$ in the $n$th row and $i$th column of a matrix? Longer Version. In numerical PDEs, e.g. LeVeque, Finite Difference ...
user avatar
0 votes
1 answer
73 views

Numerically integrating $\int_{20}^\infty\frac{4^{1+4ix}\Gamma(-4ix)e^{-2ix}}{(-2i)^{-4ix}}dx$

I want to compute the following integral numerically in Mathematica, $$\int_{20}^{\infty} \frac{4^{1+4ix}\Gamma(-4ix)e^{-2ix}}{(-2i)^{-4ix}}dx$$ The problem is that when evaluate the integral from $20$...
user avatar
0 votes
1 answer
21 views

Find the coefficients of a cubic spline

Let $S_3 : [x_0,x_n] \to \mathbb{R}$ be a cubic spline on $I_i=[x_i, x_{i+1}]$ such that $S_3(x_i)=y_i$ and $S_3'(x_i)= z_i, i=0,...,n$ we consider $S_{3,i}$ the restriction of $S_3$ on each interval ...
user avatar
2 votes
0 answers
41 views

Truncation error - subtraction

i try to eliminate truncation error with subtraction in calculating root of function where$$x_1=\frac{-b-\sqrt{b^2-4c}}{2},\quad b<0,\quad 0<c\ll 1.$$Does someone have an idea of how to change ...
user avatar
0 votes
0 answers
22 views

Quadratically convergent procedure so that the associated procedure function is without division

Hey I'm having trouble solving the following exercise. Do you have a solution? Let $a>0$ and $1/a > δ > 0$. Give a locally quadratic convergent procedure for the determination of $1/a$ on the ...
user avatar
4 votes
1 answer
57 views

Prove that $\kappa (A) = \sup\Big\{ \frac{||Ax||}{||Ay||},\ ||x|| = ||y||\Big\}$.

I am trying to prove this for my numerical analysis class. This is from chapter 4.4 of Kincaid and Cheney's book. So far I haven´t got any good idea. I have tried $$ \|A\| \|A^{-1}\| = \sup \|A\frac{u}...
user avatar
1 vote
0 answers
51 views

Numerically solve overdetermined linear matrix system

I have known real matrices $A\in \mathbb{R}^{\ell \times n}$ and $B\in \mathbb{R}^{m\times n}$, where$$\ell \gg n\gg m.$$I want to find numerically a real matrix $X\in \mathbb{R}^{\ell \times m}$ such ...
user avatar
  • 4,844
0 votes
0 answers
20 views

If $f \in C^5[a,b] $, what can I say about the order of convergence of the interpolating polynomial using Chebyshev nodes?

If $f \in C^5[a,b] $, what can I say about the order of convergenze of the interpolating polynomial using Chebyshev nodes? I have the following theorem:Let $\{p_n(x)\}$ the sequence of polynomials ...
user avatar
  • 653
1 vote
0 answers
16 views

Error analysis of hardware or software implementation of the 2D DCT

The cosine terms are constants. These are multiplied with fyx for 2D transform. When this is implemented in hardware/software we deal with following issues: fixed point vs floating point ...
user avatar
1 vote
1 answer
41 views

How do I propagate relative uncertainty through atan2?

I've got $y = \sin(\theta)$ and $x = \cos(\theta)$ with some relative error on both. If I compute $\theta$ with $\theta = \operatorname{atan2}(y,x)$, how do I propagate the relative error from the ...
user avatar
  • 461
1 vote
1 answer
28 views

Does always exist a linear transformation from Vandermonde matrix to another Vandermonde matrix?

Suppose I have an $n\times n$ Vandermonde matrix $V_1$ where the roots/points in $x \in \mathbb{R}^n$ are all distinct and matrix $V_1$ is of the form $$V_1= [1 \; x \; x^2 \ldots x^{n-1}]$$ where the ...
user avatar
  • 364

1
2 3 4 5
260