Questions on numerical analysis/numerical methods; methods for approximately solving various problems that often do not admit exact solutions.

learn more… | top users | synonyms (2)

2
votes
1answer
384 views

Rounding .5 - why isn't rounding away from zero the 'right' answer?

I am familiar with the issue of 'how should one roung .5?', and I am familiar with the conventional solutions, but I don't understand why there isn't a correct answer. When you're formulating a ...
1
vote
0answers
219 views

Unable to find Lipschitz constant for $y'=(t-1)\sin(y)$

Given the problem: $$y′ = (t − 1)\sin(y),\;\;\;y(1) = 1$$ find an approximation for $y(2)$. Give an upper bound for the global error taking $n = 4$ (i.e., $h = \frac{1}{4}$) The goal is to find an ...
2
votes
1answer
125 views

approximate error between integral an sum

I am new here. My problem: There is an integral $I:=\int_0^1 f(x)\,dx$ for $f\colon [0,1]\to\mathbb{R}$ and I want to compute it by ...
3
votes
2answers
216 views

3rd order Runga Kutta method agrees with Taylor Series up to terms of order $h^3$?

Consider the initial value problem: $$y(0) = 1, y ′ (t) = λy(t)$$ Using that the solution is $y(t) = e^{λt}$, write out a Taylor series for $y(t_{i+1})$ about $y(t_i)$ up to terms of order $h^4$ ...
0
votes
1answer
328 views

Does conjugate gradient converge for negative definite matrices?

Guys I was reading about CG method to solve the sparse systems. I came across that the method is defined for positive definite symmetric matrices. I was wondering does it converges for negative ...
0
votes
1answer
77 views

Approximating a simple sum

Can somone help me find an assymptotic formula for n, for fixed x , for this sum , perhaps an inequality would be even better, or some bound on the error. $$\sum_{k=1}^n \frac{1}{\log(kx)}$$ I need ...
1
vote
3answers
373 views

Chebyshev polynomials of first kind

I know the chebyshev polynomials of the first kind can be approximated using the cosine function, where $T_n(\cos \theta)=\cos(n \theta)$ and I know that chebyshev polynomials are a family of ...
1
vote
1answer
98 views

understanding the least squares criterion

I was given 20 data points and asked to choose the most suitable lowest degree polynomial to fit them using the least-squares criterion. I looked it up, but what i found seems far too complex or just ...
1
vote
2answers
232 views

Newton Iteration method derivation

How is Newton's Iteration achieved? I mean, can you please explain where does Newton's iterative formula $x_{k+1}=\frac{1}{2}(x_k+\frac{x_k}{N})$ come from?
0
votes
2answers
4k views

The mid-point rule as a function in matlab

How would I go about creating a function in matlab which would calculate the following $$M_c(f)=h \sum_{i=1}^N f(c_i)$$ where $h=\frac{b-a}{N}, \\c_i=a+0.5(2i-1)h,\\ i=1,\ldots,N$ What I have ...
1
vote
0answers
166 views

Colleague Matrix

Can someone explain to me the concept of a Colleague Matrix. I tried to find some information online and I haven't been able to find anything. Example.. Given the function $$f (x) = x\bigg(x − ...
1
vote
1answer
63 views

Interpolation of a function

Given the function $$f (x) = x\bigg(x − {1\over4}\bigg)\bigg(x − {1\over2}\bigg)$$ How can I interpolate $f(x)$ with $p(x) = a_0T_0(x) + a_1T_1(x) + a_2T_2(x) + a_3T_3(x)$ to show that $$a_0 = ...
2
votes
2answers
2k views

Runge-Kutta algorithm for a given ODE system

consider the system given by: $$x'_{1}=9x_{1}+24x_{2}+5\cos t-\dfrac{1}{3}\sin t$$ $$x'_{2}=-24x_{1}-51x_{2}-9\cos t+\dfrac{1}{3}\sin t$$ with initial values $$x_{1}(0)=\dfrac{4}{3}$$ and ...
1
vote
0answers
26 views

clairification on standard deviation

I have a homework question that gives me a set of $x$ values and their respective $f(x)$ values and asks me to find the line which best fits the data. I have to do this by finding the estimated ...
0
votes
1answer
430 views

Forward and Backward Euler.

I want to consider this differential system: $$ \ \frac{dx}{dt} = -y(t)\\ \frac{dy}{dt} = \ x(t) $$ where $t>0$ with initial condition$ (x(0),y(0))=(1,0).$ First I want to show that this ...
0
votes
2answers
419 views

What Stopping Criteria to Use in Projected Gradient Descent

Suppose we want to solve a convex constrained minimization problem. We want to use projected gradient descent. If there was no constraint the stopping condition for a gradient descent algorithm would ...
0
votes
1answer
230 views

Lagrange Cardinal Function Proof

How can I use the Lagrange interpolation polynomial $$p(x) = \sum_{i=0}^n ℓ_i(x)f(x_i)$$ that interpolates $f(x)$ at distinct points: $x_0 , x_1, ..., x_n$ where $ℓ_i(x)$’s are cardinal functions to ...
1
vote
1answer
81 views

Deriving Chebyshev Polynomials

I'm trying to show that the derivative of Chebyshev polynomials at $x = 1$ satisfy $$T_k'(1) = k^2$$ for each $k ≥ 0$. I can get the derivative to come out as $$T'_k(x) = \frac{k ...
0
votes
1answer
68 views

Does order of convergence formula apply to initial value problems?

Here is the formula for determining order of convergence, $q$ is the order of convergence if we can find a constant $\mu$ that the fraction converges to as $k \to \inf$... $$\lim_{k\to \infty} ...
1
vote
1answer
207 views

Properties of One-Step Methods for Solving Differential Equations Numerically

Given the Cauchy problem $$\left\{\begin{array}{ll} y(t_0)=y_0&&&&&&&&&&\\ y'(t) =f(t,y)\\ \end{array}\right.$$ The equivalent one-step method is of the form ...
1
vote
2answers
1k views

Moore-Penrose pseudo inverse algorithm implementation in Matlab

I am searching for a Matlab implementation of the Moore-Penrose algorithm (convertable to C++) computing pseudo-inverse matrix. I tried several algorithms, "Fast Computation of Moore-Penrose Inverse ...
0
votes
2answers
158 views

Conditions for which two matrices multiplied together can be separated using PCA

Suppose that I have two real-valued matrices $\bf{A}$ and $\bf{B}$. Both matrices are exactly the same size. I multiply both matrices together in a point-by-point fashion similar to the Matlab ...
1
vote
2answers
1k views

Procedure for adaptive step size for Runge Kutta 4?

I am writing a Runga Kutta 4 algorithm in MATLAB. I would like to add adaptive step sizing to this algorithm. From what I've read it seems you calculate the value of the function for two step sizes ...
0
votes
0answers
180 views

Effect of step-size on error?

If we have a numerical approximation for a differential equation with an error term that is $O(h^2)$, then in that case it would seem that if the step size is less than $1$ that we would prefer to ...
0
votes
1answer
80 views

What is meant by consistency for one step methods?

Does anyone know what it means for a one-step method to be 'consistent'? I've seen it written that if $a + b = 1$, then the RK2 method is consistent. How can I show that if $a + b = 1$ then RK2 is ...
4
votes
2answers
105 views

Linear regression where undershooting isn't as bad as overshooting

Given a set of points $(x_i, y_i)$, least-squares linear regression finds the linear function $L$ such that $$\sum \varepsilon(y_i, L(x_i))$$ is minimized, where $\varepsilon(y, y') = (y-y')^2$ is the ...
2
votes
1answer
23 views

What does $a_1$ plus $a_2$ have to equal $0$, and (other stipulations) for RK2?

I am studying Runge Kutta methods using the videos here - http://mathforcollege.com/nm/videos/youtube/08ode/rungekutta2nd/rungekutta2nd_08ode_derivationone.html. $y_{i+1} = y_i + h(ak_1 + ak_2)h$ ...
1
vote
0answers
48 views

Numerical Analysis ODE's

I am trying to solve this problem, but am having some trouble. The ODE $u''=\cfrac{u'}t - 4t^2u$ has the solution $u(t)=\sin(t^2)+\cos(t^2)$. I want to plot the exact solution over the interval ...
3
votes
1answer
83 views

Computing a slowly-converging limit

Let $$ f(x)=-\log\log x+\sum_{2\le n\le x}\frac{1}{n\log n}. $$ How can I efficiently compute $$ f(\infty)=:\lim_{x\to\infty}f(x)? $$ Brute force suffices to find 0.7946786454... but I would like ...
1
vote
1answer
921 views

How to find minimum n for Composite Trapezoidal rule?

I'm taking a course on numerical methods to be able to program math, it's part of the game option of my compsci bachelors.This is part of one of the questions: Given the integral: $\int_6^{12} ...
1
vote
0answers
121 views

“Leading order error” vs “order of the error”

This may be a daft question but I wanted to be sure. If I were asked to find the leading order error when using the mid-point rule to approximate a function $f(x)$ would it be the same as being asked ...
2
votes
1answer
83 views

Determining function inputs when outputs are recursively related to each other

I have a vector $\bf{b}$, and elements of this vector are generated by evaluating a rather complicated function $f(x)$ for $f(x_0), f(x_1),...,f(x_N)$. Here are the equations that constitute $f(x)$. ...
1
vote
0answers
486 views

Trapezoidal Rule for Numerical Integration

If the trapezoidal rule approximates an integral with trapezoids, then I thought (and was tought in high school) that the formula is: $ \frac{h}{2}(f(x) + f(x + h))$ Where $h$ is the distance between ...
2
votes
1answer
1k views

Rewrite matrix equation for Euler method and Improved Euler method

Consider a system of the form: (1) $x' = Ax + g$ For appropriate matrices $x'$, $A$, $x$, and $g$. If we let $y_n$ be the approximation to the solution of (1) at time step $t_n$, what matrix ...
0
votes
1answer
249 views

Constructing second degree Legendre Polynomials

How would I construct a second degree Legendre Polynomial for $f(x)=cos(x)$ on the interval $[-1,1]$? I am not understanding the explanation in the book. I just want to know how to start. Thanks.
0
votes
1answer
44 views

Writing expressions as column matrix…B-splines?

The question: Evaluate $$\sum_{k=0}^4 c_kx^k$$ for $x=0,1,2,3,4$. Write these five expressions as a matrix product $Mc$, where $M$ is a 5x5 matrix, and $c$ is a column matrix with components ...
0
votes
1answer
95 views

Constructing piecewise quadratic polynomial

The question asks to construct a piecewise quadratic polynomial defined on the interval $\mathbb{R}$ of the form $$ B_0= \begin{cases} p(x)=x^2,\qquad\qquad\quad\; 0\leq x<1,\\ ...
0
votes
1answer
118 views

How can I make estimates on large powers and logarithms such as $e^{10}$?

Just wondering, are there any useful tricks to make estimates of large powers or logarithms just by hand such as for $e^{10}$? Any such ways to get an error less than 1?
7
votes
2answers
262 views

Significant digits

We use currency conversion rates for financial calculations. Our currency conversion table stores conversion rates to and from each currency (about 150 world currencies) for each day, going back 20 ...
1
vote
1answer
116 views

Creating a 3D surface from 2D graphs

So I have two sets of equations: $\mathcal{A}$ = \begin{equation} \{ f(y_{0},x), \, f(y_{1},x) , \;... \;, f(y_{n},x) \} \end{equation} $\mathcal{B}$ = \begin{equation} \{ g(y,x_{0}), ...
1
vote
1answer
113 views

Newton-Raphson method and solvability by radicals

If a polynomial is not solvable by radicals, then does the Newton-Raphson method work slower or faster? I don't know how to approach this.
0
votes
1answer
61 views

Integrate on a grid of multiple variables

This is a numerical analysis problem that I should know the answer to, but for some reason, I am all over the shop... I have a grid of $\rho$ and $T$ values, with $\rho > 0$ and $T \ge 0$. At each ...
0
votes
1answer
68 views

Calibrating the Euler Method

$f(x)=-x$ and initial condition $x(0)=1$ Using the Euler Method with the step size $\Delta t=1$, estimate $x(1)$ numerically. I so far did: $X_{n+1} = X_n+f(x_n)(1) $ $X_1=0$ $X_2=0 $ I ...
1
vote
2answers
59 views

Numeric integration with unknowns

The problem I have is a system of three non-linear equations with three unknowns. Each equation has a integration term. But the integration term has all the three unknowns in there. Some suggested to ...
1
vote
2answers
108 views

Difference between lsq(A,b) and A\b (on Scilab)

Can you explain me the difference between lsq(A,b) and A\b? Why do I get a positif solution when I use lsq(A,b,1)? Where can I get the source code of lsq function? Thank you.
1
vote
1answer
62 views

Determine the numerical method

Please, help to understand the method which is used in the following snippet: ...
0
votes
1answer
80 views

A connection between the old and new iterand change

Suppose $u_{i+1}=f(u_i)$, for $i=0, 1, 2,...$, and $z_i=u_i-\alpha\cdot(u_{i+1}-u_i)$. Furthermore, let $\Delta u_i=f(u_i)-u_i$, and let $v_i=f(f(u_i))- 2f(u_i)+u_i.$ Can it be shown that $$\Delta ...
0
votes
0answers
119 views

Taking inverse Fourier transform of complicated multipart equation

Define $\tilde U(\tau ,\omega ) = \frac{1}{{\Lambda (\tau ,\omega )}}\exp \left[ {i\int\limits_0^\tau {\left( {{{\left( {\frac{\omega }{{{\omega _h}}}} \right)}^{\frac{1}{{\pi Q(\tau ')}}}} - 1} ...
0
votes
3answers
161 views

Need help starting a Numerical Differentiation problem

Derive the following difference approximation for the first derivative: $f'(x_0) = (f'(x_0 + 2h) - f(x_0 - h))/3h$ I really just need some pointers in how to start this out. If I were to guess, it ...
0
votes
1answer
301 views

modifying regula falsi method to solve non zero root equation

we use regula falsi method for numerical analysis such as for equations like this x^3 + x^2 + 1 = 0. As you can see, regula falsi works like a secant method. The roots of that equation are the values ...