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)

1
vote
0answers
151 views

Transient state on heat diffusion equation numerical solution

I'm trying to find a transient temperature of a certain location of a 3D body, after a known perturbation. I'm solving the heat equation using finite differences. I've tried the explicit, implicit and ...
2
votes
0answers
413 views

Understanding Fourier Transform and FFT

First off, I'm sorry if this is a repost. I am currently writing my thesis, and I've been thrown into some Fourier analysis, which I know nothing of. So, even if this question has been posted before, ...
0
votes
0answers
79 views

How does one more Efficiently Numerically Solve Multidimensional Problems using Spectral Methods?

As per the title, would you please tell me how to more efficiently solve multidimensional partial differential equations? Other then just tediously writing out the matrix elements manually. If you ...
3
votes
0answers
118 views

How should c be chosen to ensure rapid convergence of $x_{ n+1}= x_ n+c(f( x_ n))$ to $\alpha$?

Consider the rootfinding problem $f(x)=0$ with root $α$, with $f´(x)≠0$. Convert it to the fixed-point problem $x=x+cf(x)≡g(x)$ with $c$ a nonzero constant. How should c be chosen to ensure rapid ...
1
vote
1answer
150 views

Solve for variable inside multiple power in terms of the powers.

I'm a programmer working to write test software. Currently estimates the values it needs with by testing with a brute force algorithm. I'm trying to improve the math behind the software so that I can ...
1
vote
2answers
768 views

Understanding proof of uniqueness in theorem on polynomial interpolation

There is a slight part of the following proof in my textbook which I don't quite get. THEOREM If $x_0, x_1,...,x_n$ are distinct real numbers, then for arbitrary values $y_0, y_1,...,y_n$, there is ...
1
vote
0answers
123 views

Orthogonal vs general curvilinear coordinates

Solutions to PDEs over irregular domains can be computed using the finite difference method by the introduction of so called body fitted coordinate systems where the coordinate lines are aligned to ...
0
votes
1answer
179 views

Requirement(s) for consistency of Runga Kutta methods?

I know that for the RK2 method to be consistent we must have $a + b = 1$ in the following equation $$\begin{aligned} y_{i+1} &= y_i + h(ak_1 + bk_2)\\ k_1 &= f(x_i, y_i)\\ k_2 &= ...
0
votes
1answer
619 views

Initial-Value Problem Taylor's Method of order 2

Given the initial-value problem $$y' = te^{3t} - 2y,\qquad 0 \leq t \leq 1, \qquad y(0) = 0$$ with $h = 0.5$. Use the Taylor's method of order two to approximate the solutions to the given IVP. ...
2
votes
0answers
459 views

Interpolating polynomial with Chebyshev nodes

I am interested in constructing an polynomial that interpolates some known arbitrary function $f(x)$ over the domain $x \in [0,70]$. I want the polynomial to have degree 14 and so need 15 points. ...
2
votes
1answer
386 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
329 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
374 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
434 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
233 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
209 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
926 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}), ...