Hot answers tagged

4

Your textbook is Numerical Analysis: Mathematics of Scientific Computing, correct? This notation is introduced in Chapter 1 "Mathematical Preliminaries", Section 1.1 "Basic Concepts and Taylor's Theorem", page 6 in the third edition.


3

Hint: 1) Show that $AA^T$ is positive semidefinite using that $\langle Bx,x\rangle =\langle x,B^Tx\rangle$ and $\langle x,x\rangle =\|x\|^2_2$. 2) Show that $\alpha I$ is positive definite. 3) Show that the sum of positive definite and positive semidefinite matrices is positive definite.


3

You can think of this system of differential equations as ${\bf x}' = f({\bf x},t)$ where ${\bf x}$ is the vector $\pmatrix{x_1\cr x_2\cr}$, and $$ f\left(\pmatrix{x_1\cr x_2\cr},t\right) = \pmatrix{x_1 + x_2\cr −3 x_1−10 x_2+x_2^2}$$ The fact that this doesn't happen to depend on $t$ makes no difference. The fact that $\bf x$ is a vector rather than a ...


2

Additionally, you have a problem with the line h = h + step while you use h as step size. Since originally step = h you get a rapidly growing step size where it should be constant. What you probably meant was t = t + h there is no need for the extra step variable. Also, consider using h=(b-a)/m for greater flexibility, using a single point of constant ...


2

What you have written is $\frac{1}{2} \frac{f''(r)}{f'(r)}$. This is actually the usual error estimate for Newton's method for a simple root and twice continuously differentiable $f$, when $x_n$ is known to be converging to $r$. It is not at all specific to your problem. To prove it, let $g(x)=x-\frac{f(x)}{f'(x)}$ and then notice that you have ...


2

$$x_{n+1} = x_n - \frac{f(x_n)}{f'(x_n)} = x_n - \frac{x_n^3+x_n -1}{3x_n^2+1} = \frac{2x_n^3+1}{3x_n^2+1}$$ hence $$x_{n+1}-r =\frac{2x_n^3+1}{3x_n^2+1} - r = \frac{2x_n^3 - 3x_n^2r+1-r}{3x_n^2+1} = \frac{2x_n^3 - 3x_n^2r+r^3}{3x_n^2+1} = \frac{(x_n-r)^2(2x_n+r)}{3x_n^2+1}$$ Therefore $$\frac{x_{n+1}-r}{(x_n-r)^2} = \frac{2x_n+r}{3x_n^2+1} \to ...


2

$C^n[a,b]$ is the set / space of $n$ times continuously differentiable functions on the interval $[a,b]$. Including $C^0$, the continuous functions, and $C^\infty$, the smooth functions.


2

Taken from wikipedia: https://en.wikipedia.org/wiki/Smoothness#Differentiability_classes A (n+1) class function means that the (n+1) derivative (and all the previous ones) of the function does exist and is continuous.


2

I would use compensated summation. Basically you can recover most of the error from a single floating point addition. This was noticed long time ago by e.g. Dekker, Knuth, and others. There are a lot of references, e.g. T. Ogita, S.M. Rump, and S. Oishi, Accurate sum and dot product, SIAM J. Sci. Comput., 26 (2005), pp. 1955-1988. Available as ...


2

Let the matrix $M$ be an $n \times n$ matrix with components $$M =\begin{pmatrix} v_1 & v_2 & \cdots &v_n \end{pmatrix}$$ where $v_i$ is the $i$th column vector with $n$ components. Now, consider $M \times M$ $$M^T \times M = \begin{pmatrix} v_1 \\ v_2 \\ \vdots \\v_n \end{pmatrix} \times \begin{pmatrix} v_1 & v_2 & \cdots &v_n ...


2

Let $Q$ be a matrix with columns $C_1$,$C_2$,$C_3$, ..... $C_n$. Then $Q^T$ would a matrix with rows $C_1^T$,$C_2^T$,$C_3^T$, ..... $C_n^T$. Now $Q^TQ$, means we have to multiply these matrices. The 1st row and 1st column element of this result ($Q^TQ$) is the multiplication of the first row of $Q^T$ with the first column of the $Q$. That will be scalar ...


1

Let's start from the definition of orthogonal matrix you feel more comfortable with: A square matrix $Q \in \mathbb{R}^{n\times n}$ is said to be orthogonal iff its rows and its columns form an orthonormal base of $\mathbb{R}^n$, that is if, calling $r_{Q_i}$ and $c_{Q_i}$ the $i$-th row and column of $Q$ respectively, represented as column vectors, the ...


1

I will here address the question "First question is, why is this one ($g(x)$ below) so good, and how to find such a fast functional iteration systematically?" Lets take your two example functions: $$f(x) \equiv (cx^re^{-x})^{\frac{1}{r+1}}$$ $$g(x) \equiv \frac{x+1}{\frac{e^x}{c}+1}$$ Expand in a Taylor series about the fixpoint $x = W(c)$. We then ...


1

It's know that the FPI $x^{t+1} = g(x^{t})$ where $g$ is continuously differentiable, will converge (locally) to the fixed point $r = g(r)$, iff $\ |g'(r)| < 1$. In your case, the first FPI has $g(x)=1 + \frac{1}{x} \rightarrow g'(x) = \frac{-1}{x^2}$, and evaluating it at $r=1.6\ldots$ gives $|g'(r)|<1$. In the second case $g(x)=\frac{1}{x-1} ...


1

We need to recall how we compute each entry in a product $AB$ of matrices $A$ and $B$: The entry at row $i$, column $j$, is the scalar product of row $i$ from $A$, and column $j$ from $B$. Now, recall that the $i$'th row of $Q^T$ is the $i$'th column of $Q$ (draw up a matrix and its transpose to convince yourself of this). Thus the entry at row $i$, column ...


1

That is because, if we denote $C_i$ the column vectors of $Q$, the coefficient $a_{ij}$ in ${}^{\mathrm t\mkern-2mu}Q\, Q$ is precisely $\langle C_i,C_j\rangle$.


1

Using the algorithm located at this site, you should get: $$L = \left( \begin{array}{ccc} 1 & 0 & 0 \\ \dfrac{1}{2} & 1 & 0 \\ \dfrac{1}{2} & \dfrac{1}{5} & 1 \\ \end{array} \right)$$ $$D = \left( \begin{array}{ccc} 4 & 0 & 0 \\ 0 & 5 & 0 \\ 0 & 0 & \dfrac{19}{5} \\ \end{array} \right)$$


1

This is not a polynomial, not just because of the square root but also because of the division. So the answer is no. Since you're far away from any singularities, it nevertheless seems reasonable to use quadrature (e.g. Gauss of order $2$) directly without any transformations. I don't see any transformation that would obviously improve the quadrature.


1

You have a signal with a frequency of $f=800$, as $$\sin^2(2\pi· fx)=\frac12(1-\cos(2\pi·2fx)).$$ To get any useful result you need a sampling frequency of at least $1600$ resp. $$dx < 0.000625.$$ Your $dx=0.008$ is one magnitude too large. Or to put it another way, the error term of an order $p$ method is dominated by $(f·dx)^p$ (with $f$ the ...


1

$P$ is a matrix and $a$ and $y$ are column vectors, so $(Pa-y)P$ doesn't really make sense because the sizes don't match up. $$ \begin{align} \frac{\mathrm{d}}{\mathrm{d}a}\|Pa-y\|^2 &=\frac{\mathrm{d}}{\mathrm{d}a}\langle Pa-y,Pa-y\rangle\\ &=\langle Pa-y,P\rangle+\langle P,Pa-y\rangle\\ &=2\langle Pa-y,P\rangle\\ &=2P^T(Pa-y) \end{align} $$ ...


1

To visualize geometrically what's going on, I will code an interactive diagram with GNU Dr. Geo (free software of mine) from where I can drag the initial value (the red dot) and see how the method converge or not. For example $x \rightarrow cos x + x$, comes with some mines, but not $x \rightarrow cos x +1.1x$. When you get close to a flat area, the ...


1

A Matlab implementation is given below: % It calculates ODE using Runge-Kutta 4th order method % Author Ido Schwartz % Originally available form: http://www.mathworks.com/matlabcentral/fileexchange/29851-runge-kutta-4th-order-ode/content/Runge_Kutta_4.m % Edited by Amin A. Mohammed, for 2 ODEs(April 2016) clc; ...


1

As you say, you could use a forward method like Euler or RK2 to compute the next solution and then continue with AB2. Another option is to compute a backward step; As you know the derivative at any point, you could evaluate it at $x_0$ to approximate the value of $x$ at the previous time, using backward difference approximation of derivative: $$\frac{x_0 - ...


1

Note that the notation $f(x,t)$ is for completeness, in the sense that it is also meant to cover cases where there is no explicit $t$ dependence. As for the other part of your question, you can write \begin{align} x_1' & = f_1(x_1,x_2,t) = \cdots \\ x_2' & = f_2(x_1,x_2,t) = \cdots \end{align} If you want me to see if I can find some examples ...


1

Here is a more elementary approach. The function $f$ has a fixed point at $(x_1, x_2)$ if and only if the following equations are satisfied: \begin{align} 1/3 \; x_2 ^2 -x_1 +1/8 =0 \\ 1/4 \; x_1 ^2-x_2-1/6 = 0 \end{align} Now you can solve the first equation for $x_2$ and insert this in the second equation to obtain a function of $x_1$ only. Use the ...


1

By transforming, it is actually just like substitution, with $x=g(\eta)$ into the integral, so; $$\int_0^1 v(x)dx = \int_{0}^1 v(g(\eta)) d(g(\eta)) =\int_{-1}^1 v(g(\eta)) g'(\eta) d\eta$$


1

Let $F$ be an anti-derivative of $f$, $F'=f$. W.l.o.g. $a+b=0$, set $x=(b-a)/2$ then we are interested in the error expression $$ g(x)=F(x)-F(-x)-\frac{x}3(f(x)+4f(0)+f(-x)). $$ This has derivatives \begin{alignat}{2} g'(x)&=\frac23(f(x)-2f(0)+f(-x))&&-\frac x3 (f'(x)-f'(-x)) \\ g''(x)&=\frac13(f'(x)-f'(-x))&&-\frac x3(f''(x)+f''(-x)) ...


1

You wish to have an asymptotic expansion of $e^{-x}$ as $x \to \infty$. Allowing $x$ to be complex, and writing $z = 1/x$, we have $e^{-1/z}$ for which we want a Taylor series expansion around $z = 0$. Like Wouter has pointed, this is impossible because $e^{-1/z}$ has an essential singularity at $z = 0$. You may write a Laurent series, but I expect this to ...



Only top voted, non community-wiki answers of a minimum length are eligible