#numerical-analysis
1 messages · Page 12 of 1
?
m=1, you use information about f and f'
m=2, you use information about f, f', and f''
So,
Besides the 1st method.
We use this to determine H, right?
H isn't the base??????
Bro what?
H is the interpolating polynomial now
I see.
Why do I need this now?
Hang on.
So, I use this process instead of... just using lagrange methode
Ok
More points = larger n
N = the sum of m + 1.
But stillm how to identify the value of m?
You choose m
Well on pages 82 and 83, we were working with m=1
But you can choose larger m if you want
Alright, here, let suppose m=10, what is m0,m1...ect?
Do they have to have a equidistinct values like 1,2,3...ect or doesn't matter?
Well
You can choose m non uniformly
So m0 is the number of derivatives that you know at x0
m1 is the number of derivatives that you know at x1
Hey! I've been trying to find integrate the analytical solution to this particular Burgers problem, but I couldn't find a way to actually solve it so I tried numerically integrating the problem with scipy integrate. For some reason, I can't get the exact solution which was found in the paper, does anyone happen to know what I might've missed?
The last one I clipped some points
All 3 plots are titled exact solution
<@&268886789983436800>
Hello. Can anyone recommend a textbook for C/C++ in the context of numerical methods?
I would never recommend a textbook to learn a programming language
i agree with angetenar but this might be kinda related to what you're looking for
its a good book that happens to use c++
Thank you, I'll try it out.
numerical recipe is very standard
?
..?
?
Does anybody here know how chebyshev systems occur in numerical analysis?
Yeah exactly do you know about these? For example, I’m curious how relevant these are to numerical analysts and how they use them. I have an idea that these chebyshev systems allow for a unique best approximation. Do people spend time constructing these for particular problems? I don’t know if this is a niche topic in numerical analysis.
never heard of it (and probably rather niche, 1 in arxiv in 25, 0 in 24, and 3 in 23 using standard spelling)
Thanks I didn’t think of checking that
Not relevant
Optimal polynomial interpolation in R^n is solved
Optimal interpolation on uniquely shaped domains is impossible
How do chebyshev systems relate to optimal polynomial interpolation in Rn? I am pretty sure they have a unique closest point propery but I don’t see how that’s the same as polynomial interpolation. I could have a chebyshev system with functions that are not polynomials. I probably don’t understand how they aren’t relevant.
I don’t know how chebyshev systems relate
I can tell you how to do optimal polynomial interpolation though
That’s fair okay I see. Optimal polynomial interpolation is solved. That is helpful thanks
On some domains
And also, maybe optimal polynomial interpolation is only solved for some system of polynomials? I don’t know optimal polynomial interpolation but I imagine there are chebyshev polynomials P1,…,Pn and for a given function f you since a best approximate c1P1+…+c1Pn. But maybe the result you had about optimal polynomial interpolation is only solved for that choice of basis Pj. Unless optimal polynomial interpolation doesn’t just mean interpolation by chebyshev polynomials but instead a more broad family of basis functions
Wait, so how do you do it? And optimal in what sense?
It doesn't matter what the basis is, they're all different ways of writing the same polynomial
Use function values at chebyshev points
Optimal in the sense of minimal lebesgue constant
In mathematics, the Lebesgue constants (depending on a set of nodes and of its size) give an idea of how good the interpolant of a function (at the given nodes) is in comparison with the best polynomial approximation of the function (the degree of the polynomials are fixed). The Lebesgue constant for polynomials of degree at most n and for the ...
Oh interesting! I'll check this out thanks
Out of curiosity, did you learn about this in a class or on your own at some point?
I should probably take a class on numerics
Classes on numerical analysis will probably not touch on the issue of optimality
Ahh
I’m confused about how you use a basis here. I thought if I had two different basis p1,…,pn and q1,…,qn then for a given function f there will be two different best approximations a1 p1+…+an pn and b1 q1+…+bn qn. My point was that just because it’s hard to compute a1…an for f doesn’t mean it’s hard to compute b1,…,bn for f. Maybe for any given basis there will exist a function it is hard to approximate. Then it would make sense to me that this sort of approximation is irrelevant.
Well suppose I had a basis consisting of sin(t),cos(t),sin(2t),cos(2t),…sin(10t)cos(10t) for t in [0,1]. I don’t think linear combinations of these functions gives the same space as the space generated by linear combinations of chebyshev polynomials. Do you know if it’s hard to approximate with this basis of trig functions? Maybe the result is different than for “polynomial interpolation”
With trig functions you use a FFT to get the interpolation coefficients
Okay so for some basis it’s possible. This is a chebyshev system
How to solve a 3d laplace equation with finite difference? This is a from mary bioas's mathematical methods book, a standard BVP in cylindrical coordinate
analytical solution are well known. But I'm wondering how to solve it numerically
so far I only done plain old 2d laplace with FD on rectangular domain. I know how to discretize that. But never done in curvilinear coordinates or in 3d
What is the laplacian in cylindrical coordinates
$\Delta u=\frac{1}{r}\pdv{r}\left(r\pdv{u}{r}\right)+\frac{1}{r^2}\pdv[2]{u}{\theta}+\pdv[2]{u}{z}$
yehuihe
this
no. never done that. i only done in rectangular coordinates
like this? assuming all $\Delta x=h$ are the same
yehuihe
$\frac{1}{r}\frac{u_{i+1,j,k}-u_{i-1,j,k}}{2\Delta r}+\frac{u_{i+1,j,k}-2u_{i,j,k}+u_{i-1,j,k}}{(\Delta r)^2}+\frac{1}{r^2}\frac{u_{i,j+1,k}-2u_{i,j,k}+u_{i,j-1,k}}{(\Delta \theta)^2}+\frac{u_{i,j,k+1}-2u_{i,j,k}+u_{i,j,k-1}}{(\Delta z)^2}=0$
yehuihe
this?
$\frac{1}{r}\frac{u_{i+1,j,k}-u_{i-1,j,k}}{2\Delta r}+\frac{u_{i+1,j,k}-2u_{i,j,k}+u_{i-1,j,k}}{(\Delta r)^2}+\frac{1}{r^2}\frac{u_{i,j+1,k}-2u_{i,j,k}+u_{i,j-1,k}}{(\Delta \theta)^2}+\frac{u_{i,j,k+1}-2u_{i,j,k}+u_{i,j,k-1}}{(\Delta z)^2}=0$
yehuihe
this. a lot of mistakes haha
Yes that looks better
Anyways now that you can discretize, you know how to solve right
by forming a linear system? this is not that trivial tho. Laplace equation in rectanglar domain is very standard, this is horrible
You can still form the linear system right
(Deleted an above message since it wasn't about numerical analysis)
Okay:
i want to know if a non diagonalizable matrix is convergent
What do i do
Because nornally id check the spectral radius of the matrix but idk if that also works for non diagonalizable matrices, chatgpt says it does but i need a source
I dont need a true proof, just a reliable proof stating it so i can just do it with the spectral radius method
OR IF CHATGPT is wrong
Please tell me asap hahaha
And if possible help me find the correct method
Oh and if this isnt numerical analysis also pls tell me because i dont really know what this is haha sorry mb 😭
Sorry i notice this msg seems a bit rude ive been talking to chatgpt to much lately hahaha, my apologies
What do you mean by convergent
Hello
Are you familiar with recurrence relations
And the techniques and methods used to "solve" them
Not really
Ok
Well
Hmmm
Can you derive T_n(cos(x))=cos(nx) from this?
Then, use the complex exponential definition of cos and expand
Yes i showed it in this way
but isnt it only for x in [-1,1]?
Then use induction I guess
Prove this for T_0(x), then assuming that it's true from T_n, prove it for T_{n+1}
so from that we get this expression but only for x in [-1,1], am i right? Or is there any way of expanding it
Yeah I suppose so
Hmm actually thats almost the only way i know for proving these things 😄
Oh my
Sentinel
yeah it doesnt look nice
Hello, I am looking for insight on how to approach question 4. One of the first thoughts that comes to mind is whether I can simplify this expression further to hopefully make the calculation more meaningful. After some simplification, I arrived at the form
2x^2 * sqrt(9 + 7/x^2))
However, this form still doesn't seem to work well with the large x=76543217654321.
Any insight on how to correctly solve this problem would be greatly appreciated!
Find a taylor series for sqrt(9x^4+7x^2) centered on 3x^2
Is a first order taylor series expansion enough?
No I don't think first order will be sufficient
I also don't think that the answer is correct
f (generic function with 1 method)
julia> f(BigInt(76543217654321)//1)
-1.16666666666666666666666666662794724165303930075401550573758460966712273705370935088660952474621511024478206717357759205978144501315472210802934002873285482```
Hmmm probably mathematica being funky
or i have some minor bug? because if i increase accuracy it does not tend to -7/6 (maybe the answer is not that)
i do not see anything contaminating the types
it is 17576592506630274028349913123-sqrt(308936604144131499563240274478770188749226284147797410416)
and that is not -7/6
Why do you use rational int
To avoid Float64 contamination of BigFloat computations (most of iit not needed but I usually overdo it because it is so annoying when in happens)
Ok
I have to compute the comatrix of $I + D^2u_n$ where $D^2$ is the hessian matrix with an example being $(D_{12}u){ij}=(u{i+1,j-1} - \dots + u_{i-1,j-1})/(4h^2)$
My question is how is $I+D^2u_n$ a matrix? If $u_n$ is a lexicographic ordering of the grid points then I dont really understand this expression to make a matrix
bongoboy44
So far ive just written finite difference matrices for each D11,D12=D21,D22
But I cant really interpret the D2un expression as a matrix
For reference
I interpreted the expression $M_{ij}$ as $I + D_{ij}$, but clearly this is wrong because it somehow depends on $u_n$
bongoboy44
They go on to say this
But its not the finite difference scheme in used to hearing about
Is this a pointwise vs global fd scheme thing?
Don't know about the syntax but isn't that just central 2nd order fd first derivative in 2 dimensions? So, kron(D,I(n))+kron(I(n),D) where D is just -1 on one offdiagonal and 1 on the other?
The one they talk about in paper would be kron(D,D)
Or you can write how you wrote it and put a multiplication in middle instead of addition
But yeah thats the right D form
But this is for a global derivative defined on a boundary
Im curious if they mean locally computing derivative, but this would confuse the fuck outta me
But i cant really make sense of the constructing comatrix part
I downloaded the paper, I will not parse that syntax 😛 French people always have to make stuff unreadable and unnecessary complex 😄
Lol i need to tho 😢
fun fact glowinski (the editor) is my scientific grandfather 🙂
Like I dont think they want you to compute 512 x 512 grid
Comatrix for 512 x 512 matrix sounds insane
i dunno, sorry
I’m pretty sure that the matrix is supposed to be I+D^2
Then how am I supposed to make sense of the algorithm update comatrix step?
The part where it says assembling M^n
Like I+D^2 u_n
They can’t mean thats just I + D^2
But if they mean its (I+D^2)u_n like applied then this makes less sense to me
Yes
Surely there are better written papers
I can link paper
Yes there are
But i chose this one
And sadly I have to stick with it
Unfortunate, sorry for your loss
I want to find something using similar method though
Because interpreting this makes no sense
Like just to check im not crazy
But computing the comatrix of the result of a FD approximation to D^2 would have no use
Let alone multiplying that by another matrix
Like I would understand computing to comatrix of D2 not this though
Holy shit
They could mean take M_ij to the nth power
Ill kms if this works though
I hope not
No that makes especially no sense
Been trying to understand what it could be for last 2 days tbh
My conclusion is that I am more confused than I was initially
@fathom rain @wide spear I found another paper discussing the algorithm update steps https://arxiv.org/pdf/1009.6039
This definitely seems cleaner
It doesnt lol
Like im pretty sure its needs to be a matrix
But I dont see any possible consistent interpretation for that
Yeah they tell us its the hessian
But it cant be where D11 represents dxx at each point on grid
Because then the dimensions for the equation wouldnt make sense I dont think
I thought about this too
But what is D2 theta then?
I had assumption D2 theta could just be the normal fd matricies
Oh wait lol
This is how I calculated the determinant
I was fine with that
And using same assumption I was letting my M_ij be the comatrix of normal 2D hessian
So like $I + D^2$ having
$\begin{pmatrix}
\partial_{yy}+1 & -\partial_{xy}\
-\partial_{yx} & \partial_{xx}+1
\end{pmatrix}$
bongoboy44
And then letting the M_ij be the respective blocks of this
But when I multiplied MijDij and solved for rhs I was getting results blowing up after 2 iterations
What tau did you use
1
The original paper used 1
Oh
Ok imma try 10
Why do they call it damped then
Lol because they have graphs that vary it
Also my blow up was crazy so I had a feeling i was doing something deeply wrong
But the determinant i calculated was convering to the true determinant
But it takes like 500+ grid size to have reasonable L infty error
Meanwhile the paper is using like 16 grid size to get their convergence
Lol
Tried something dumb
It still makes no sense to me
But i pretty much multiplied each entry of the D^2 matrix row wise by grid evaluations of comatrix evaluated on the grid
Then turned damping to 10
Got the error to be under 10 and decreasing lol
Ok
In their masters thesis they wrote about it
This is the stencil they gave lol
Im not sure where it comes from
Im confused
Cuz this is a fourth order
Yea ill have to give up );

The condition number of the matrix was better ig?
Before it was reading like 10^16 and stuff
Now its consistently 40
Can someone explain how we go from third to last to second to last? This is just a derivation of simpsons rule but I got no clue how we go between those two steps. Everything else is intuitive enough
Prof explained in class but I was doodling in the upper right corner the whole time so I forgot to note it down.
Test is tomorrow and we need to have this memorized(which i do, but id still like to know what happens there)
Which two lines are you referring to
Ok there are typos
It should be Aa^2+Ba+C and Ab^2+Bb+C
If that explains the confusion
Hello
I'm learning at university with a book called Numerical Analysis 9th edition, can I asked is there any where to find full solution of the book?
If there are specific questions that you need help with, feel free to ask here
say that i have a python function Matrix(l1, l2) that creates a 2x2 matrix with eigenvalues $l_1, l_2$. Now i implemented the power iteration method and theory says that if the absolute values of $l_1 \text{ and } l_2$ are close to each other i will get slower convergence. Why do I get much slower convergence for Matrix(-(N+1), N) than Matrix(N+1, N) even though $|\frac{-(N+1))}{N}| = |\frac{N+1)}{N}|$ (here N is some natural number)?
dompa
Can someone help me in discretization of an ODE?
I can't seem to get it into set of linear equations.
It has quadratic terms.
uh no, I get phi^2 terms
which I cant get it in a linear equation form to solve with gaussian elimination
diffusion coefficient varies with specific quantity, its annoying to solve
ok a little bit of research I did
and its called richardson iteration
to solve such systems
hello, i have trouble with Allan Variation. After analyzing the variations and identifying the noises, I calculated the Bias instability of 0.06 deg/h, when according to the Datasheet it should be about 6 deg/h
Allan Var for MEMS gyro for all XYZ axis
Is your 0.06 measurement from averaging the x y and z plots
Think need more context from you regarding datasheet too

Please go to one of the discussion channels for casual conversations
And please don't post the same message in multiple channels
I'm trying to determine (lol) what I can about the determinant of an $n\times n$ matrix (indexed from $0$ to $n-1$) whose entry in row $j$ column $k$ is $\sin(x_k)\cos(x_{j-k}) - \sin(x_{j-k})\cos(x_j)$.\
My advisor suggested somehow decomposing the matrix into the difference of two matrices, one with $\sin(x_k)\cos(x_{j-k})$ for the entries, and one with $\sin(x_{j-k})\cos(x_k)$ for the entries.\
Here, $x_0, ..., x_{n-1}$ are arbitrary real numbers corresponding to the arguments of a biunimodular sequence $(e^{ix_0}, ..., e^{ix_{n-1}})$.\
I'm not sure how to relate the determinant of the whole matrix to the smaller parts, since determinants tend to respect multiplication but not addition.
Tiborculosis
You can rewrite that using trig identities right
This feels very close to a DFT matrix
Yes; I started with $\sin(x_k-x_{j-k})$ and was encouraged to expand and separate.
Tiborculosis
It does feel like a DFT matrix. I'm trying to study the finiteness of circulant Hadamard matrices of given dimensions via an isolation argument, and trying to ascertain what conditions on dimension and $x_0,\ldots,x_{n-1}$ lead to isolation.
Tiborculosis
My advisor suggested expanding, which leads to a difference of matrices that have constant factors along the columns corresponding to $x_{k}$ for column $k$. It's very related to DFT matrices; there's a theorem that says that a circulant matrix $M$is a complex Hadamard matrix if and only if the first row of $M$ forms a biunimodular sequence, via conjugation by the DFT matrix.
Tiborculosis
Expanding doesn’t tell you anything about the determinant
I can't see what one gains from doing so, but my advisor said something about using the multilinearity of the determinant to break it down further into two from here.
how are $x_{1-n},\ldots,x_{-1}$ defined? $x_{-j}=x_j$?
se
Like so
Far as I'm concerned though, just real numbers between 0 and 2pi
I'm sure the other aspects of their definition are good for something
but i'm not sure what that something is.
so x_j are just random numbers, [0,2pi]? no ordering or anything?
if so, then I do not think there is much to do
where does this come from?
I'd like a hint on the following problem which is supposed to be easy but I blanked and it's 1am here
For functions $f \in C[0,1]$ with the usual supremum norm, define $E_n(f) = \operatorname{dist}(f, \mc{P}n)$ as the best approximation error to the function $f$ with degree $n$ polynomials. Prove that if $f^{(n)} > 0$ on $[-1,1]$ then $E{n-1}(f) > E_n(f)$
jamiecjx
What have you tried
Ok, after waking up I still didn't figure it out, but I tried mostly combinations of Chebyshev equioscillation theorem together with some properties of divided differences in order to use the condition on $f^{(n)}$
jamiecjx
I think I figured it out, but it's longer than I expected and I hope there's a smaller solution
Let $p \in \mc{P}{n-1}$ such that $E{n-1}(f) = E_n(f)$. Then $p$ is the best approximation to $f$ in $\mc{P}n$ as well so there exists a strictly increasing sequence of $n+2$ points $x_1, ... ,x{n+2} \in [-1,1]$ such that
\begin{equation}
f(x_i) -p(x_i) = (-1)^i \gamma \qquad |\gamma| = E_n(f)
\end{equation}
By considering divided differences we have $(f-p)[x_1,..., x_{n+1}] = f[x_1,..., x_{n+1}] > 0$ by the MVT for divided differences (since $f^{(n)} > 0$). Similarly $(f-p)[x_2,..., x_{n+2}] = f[x_2,..., x_{n+2}] > 0$.
But we also have the explicit formulas
\begin{equation}
(f-p)[x_1,..., x_{n+1}] = \sum_{j=1}^{n+1} \frac{(-1)^j \gamma}{w_1'(x_j)} \qquad w_1(x) = (x-x_1)...(x-x_{n+1})
\end{equation}
\begin{equation}
(f-p)[x_2,..., x_{n+2}] = \sum_{j=2}^{n+2} \frac{(-1)^j \gamma}{w_2'(x_j)} \qquad w_2(x) = (x-x_2)...(x-x_{n+2})
\end{equation}
Note that since $w_1'(x_2) < 0$ and $w_2'(x_2) > 0$ and the signs of $w_1'$ and $w_2'$ alternate between each root, it's not possible for both of these sums to be positive, hence contradiction
jamiecjx
Hello guys, I'm new here. I have a question regarding an error estimate for the explicit Euler method for a 2D heat-equation. It's on channel #help-4 . Can anybody give it a look?
Please repost your question here
Sure, here goes:
Hello all, I'm new in the server!
I just posted this on Computational Science Stack Exchange, but decided to try my luck here as well.
I am solving the heat-equation $\frac{\partial u}{\partial t} = \alpha\nabla^2 u$ on the domain $\Omega = [0,1]^2$ and interval $t\in[0,1\times10^{-2}]$ with homogeneous Dirichlet boundary conditions in 2D. I am using a central finite-difference method to discretize in space and the forward Euler method to discretize in time, and end up with a scheme like:
\begin{equation}
u^{n+1} = u^n + \delta t\alpha L u^n,
\end{equation}
where $u^n$ are the nodal values of the numerical solution and $L$ is the discrete analog of the Laplacian operator in 2D.
If I compute the relative global error as $e \colon = \frac{||u^T-u^\text{exact}(t_f)||_2}{||u^\text{exact}(t_f)||_2}$ and plot it against the mesh spacing $h$, I get the following plots for $\delta t = 5\times 10^{-4}$ and $\delta t = 1\times 10^{-4}$ (plots in the attached figures)
The red dots correspond to simulations done outside the CFL stability condition $dt \leq \frac{1}{4\alpha h^2}$.
I have \textbf{two questions} about these graphs.
\section{Question 1}
Why isn't the error blowing up sooner (for larger $h$) in the case of $\delta t = 5\times 10^{-4}$, since the points in red all violate the CFL condition? Might it be a sign of a problem in my implementation?
\section{Question 2}
I find this to be weird behaviour since I would expect the error to be a monotonic increasing function of $h$, instead it seems that there is an optimal $h$ for which the error is minimal.
An explanation I found for this behaviour is that, as $h$ decreases, the condition number of $L$ increases, namely $\frac{\lambda_\text{max}}{\lambda_\text{min}} \approx h^{-2}$. This causes the ODE system to become increasingly stiffer, and thus the local truncation error for an explicit method, such as the Euler method, becomes increasingly large. Is this the correct explanation for this behaviour? If so, can someone give me a more quantitative explanation? In specific, can I predict where the "inverted peak" will happen?
Rui Martins
I might have time to answer you today
Thank you @wide spear !
I got several replies from the Computational Science Stack Exchange and already understand what is happening. Here is the link of the question:
It's basically the leading terms of the local truncation error cancelling out, for a particular choice of $N$, that casuses this behaviour.
Rui Martins
Ok nice
Do you happen to be familiar in this topic?
I've been having issues with a model converging near the center of a circular radius, tends to blow up with a singularity and I'm trying to find numerical/mathematical methods to correct it without using blind assumptions.
This paper is certainly useful, though it tickles my brain to read its math rhetoric.
My code is not working. I just want to plot the solution to my ODE. This seems like the exact same thing as in the ODE45 documentation. What's wrong with this?
Can anyone help me solve or at least find a good general approximation for this system of differential equations with initial conditions $v_{i;x}(0)=\cos{\alpha}$ and $v_{i;y}(0)=\sin{\alpha}$ : $\frac{dv_x}{dt} &= -\frac{k}{m} \sqrt{v_x^2 + v_y^2} \cdot v_x \$, $\frac{dv_y}{dt} &= -g - \frac{k}{m} \sqrt{v_x^2 + v_y^2} \cdot v_y$? Thanks!
Archon
Compile Error! Click the
reaction for more information.
(You may edit your message to recompile.)
ok i believe this is the right channel
so we are learning about approximating roots of functions using a bunch of different types of methods
one of the exercises asks me what the convergence order of the newton method is
in the text book it says p=2 if it is a singular root. So im wondering what it is if it is a multiple root
More details
Have you looked at the proof of convergence for newton's method
ah thank you there is in fact a proof abt a multiple root a few pages before where i was looking
Nice
what is the order of a perturbation?
there is a sentence in the book that says
"Since the perturbation of $f$ is of the order 0.001. We do indeed expect that $\Delta x = 0.001$
you_are_me
We have the function $f(x)=\sin (x)$ and the perturbation function is $g(x)=0.001(1+\sin(x))$
you_are_me
and the condition number is 1 btw
Order = size in this context
aha so like if i make the number 0.003 instead of 0.001 then it is of order 0.003?
that makes sense
ok and so to find $\Delta x$ u just do the order times the condition number?
you_are_me
ooooh yeah obv
my brain is deepfried ngl
ok then everything works out yipie
Thanks btw before i forget to say that
Glad to help
who here is a finite element method chad
I can provide a bit more when I sit down at my office computer. Short story is that I have a momentum balance model that iteratively calculates the balance of forces from an outer radius to the inner point of a circle. Each iteration, it numerically calculates some (difficult to solve explicitly) integrals, of which are a function f(y)= Annular area / annular outer perimeter and f(y) = 1 / annular outer perimeter. Both cases, especially the latter, approach infinity as each iterative calculation approaches the centerline, ie singularity.
I know what the final solution profile z = f(y) should be - it should approximately fit a 1/7th velocity power law profile except with a 0 slope at the centerline.
I was curious about numerical methods to a) identify when and if a singularity effect begins/is significant and b) how to stop it from happening numerically.
So far, I’ve been just finding when the solution z = f(y) second derivative changes signs because that would keep the (slope) first derivative from approaching zero at the centerline, and then approximating a polynomial fit. But, it doesn’t feel verifiable/tied to the model.
As per, I'm using shear from radial distance y = d to y = R, where d is the radius of the film and R is the inner radius or centerline of the circular cross-section. See attached image. We assume angular symmetry. Marching from y=d to R, we iteratively calculate the velocity from a shear balance.
The velocity equation is shown in an image from one of my model sketchbooks. The integral terms in the equation likely have to be solved numerically, as the 1 / mu_g_t term essentially results in a VERY nasty integral. But, the problem lies in the A_H / P_H,y and 1 / P_H,y terms in the integrals. In my case, A_H = pi ((R - d)^2 - (R - y)^2) and P_H,y = 2 pi (R - y).
These integral terms blow up, particularly the integral of 1 / P_H,y, as y approaches R simply due it becoming the integral of infinity. Are there numerical methods to avoid such a singularity, or to help identify when the singularity becomes significant?
Also, the colored graphs shows the terms of the equation calculated in terms of [m/s] velocity contributions, i.e. you can see them blowing up as they approach the centerline radius R.
\begin{align*}
u_{g}(y) &= -\frac{dP}{dz} \int_{d}^{y} \frac{A_{H}}{\mu_{gt} P_{Hy}} , dy
- \tau_i P_{fd} \int_{d}^{y} \frac{1}{\mu_g P_{Hy}} , dy
- \Gamma_{fg} u_i \int_{d}^{y} \frac{1}{\mu_g P_{Hy}} , dy \
&\quad + \frac{d}{dz} \left( \left[ \int_{d}^{y} \rho_g u_g^2 P_{cy} , dy \right]
\left[ \int_{d}^{y} \frac{1}{\mu_{gt}} P_{Hy} , dy \right] \right)
\end{align*}
kryle
Here’s the equation!
It’s not in the image, but y is the radial distance from the outside wall, from y=0 at the exterior to y=R at the centerline
regarding numerical solutions to partial differential equations:
i hate numerical solutions to partial differential equations. that is all
why?
a dozen little inequalities and bounds chained together in a not-entirely-intuitive for the simplest elliptic equation on a square domain with as much continuity as possible; and then as soon as you want to consider a less smooth function it gets three times worse, and if the domain isn't square then it's even more terrible, and if the equation isn't simple then god help you
and all that's just for elliptic equations, for parabolic or hyperbolic you want a completely different set of tricks and inequalities and you have to worry about stability analysis and forwards and backwards schemes and oh my god
if nothing else the sheer amount of writing is going to kill me, the equations take three lines and every time i find a mistake somewhere on page 1 another tree dies
Are you talking about the finite difference method? 
yes?
good idea, i'll try that in the exam
Go ahead, find another explicit solution 
solved laplaces equation in 2D with boundary condition on an arbitrary mesh with finite element method, the height of a point is equal to the value of the function, I think I cooked chat
Ok

Have you checked for convergence
yeah I did I calculated the solution analytically aswell for some simpler meshes like square shape and f(x,y) sin(x)*e^y and the average error per node was like 0.002 or something like that if I compared my approximation u with boundary condition f and f itself at those nodes
like if thats my boundary condition then I would expect u = f on the interior aswell
are you proud of me?
That's not what it means to check for convergence
what does it mean
Change the spatial resolution
Compute the relative L^2 error for each
Check if it converges 1st order or 2nd order or whatever
what range of mesh size should I use? 0.1 to 0.0001 ? how many zeroes?
I need to refactor my code to use sparse matrices because now its just slow, I'll try checking afterwards thanks
i like to just loop through my solver, divide by 2 in the mesh size each time, compute the ratio of the previous error and the current error, and the log base 2 of it
if you have half the mesh size and the error reduces by a factor of 4 then you’ll have second order convergence
I am currently learning about Spectral Methods to solve PDEs numerically and I am would like to ask about it’s accuracy/stability
Spectral methods consider the points/variables globally and does something akin to interpolation to get the function/model of best fit. From my experience w/ normal interpolation, I know methods like cubic splines often are far more stable
I know Spectral methods have exponential like convergence already but how would the method fair when mixed with splines?
I’m still learning all this as I’m asking and its been awhile since i learned interpolation so apologies if my question seems rather vague
There are spectral element methods where you do something local
Frequently it's just with a standard set of polynomials but you can use splines as well
Could you elaborate?
In what part of the model would the splines take place? Would it be after you found the basis functions?
The splines would form a local basis
Instead of a global one
You can look into spectral element methods
ayo hi let me poke my head in here. i got a for-fun algorithm that i want to analyze for numerical precision
im thinking that maybe i can expect a worst case error of about log_10(1.00005) per computational step? which means 10 times that in all, so expecting 4dp is a bit strenuous...?
here's an example of a computation with this algo
log_10(1.1) rounded to 4 decimal places is 0.0414 so you aren't that far off
Absolute error of 0.0004 so relative error of 0.0097
So for 12 steps, you introduce roughly 0.0008 relative error at each step
so the question asks
the newton cotes formula iwith even degree n=2k is as accurate as the newton cotes formula with uneven degree n=2k+1
im looking at the error upper bound formula for n=2 and n=3 and i see in both a fourth derrivative and h^5 but for n=3 it has a term 3/80 while for n=2 it has a term 1/90
so i conclude the upper bound for n=3 is in fact higher? thus meaning that the statement is wrong and in fact n=2k+1 is less accurate than n=2k
but im seriously doubting that so can someone tell me if i went wrong and how i went wrong i i did go wrong?
oh wait i think i see where i went wrong h is smaller for 3 than for 2 right? so 3 would be more accurate
how would i solve this numerically
You can use Python for it
can you do it for me pls i dont have it installed rn
but i need to do it by hand as well

Newton's method
Yes
You can use Newton's method as @wide spear . Other non-linear solvers will also work.
I don't use python, but I suppose you first have to write your system as F(x) = 0, where x is (b_1,b_2) in your case.
Something like this:
$F \left(b_1,b_2\right) = \begin{bmatrix}\cos(b_1)-0.72\cos(b_2) \tan(b_1)-\tan(b_2)+0.8697\end{bmatrix}$
Rui Martins
I think you can use fsolve from scipy.optimize, but there might be a better option. If you just want a solution for this problem, any nonlinear solver will do really.
No selfroles matching not studying.
See ,selfroles --list for the list of valid selfroles.
Please select the desired selfroles! (Use ,iamnot to remove your current selfroles.)
1. Helpers
2. Not Very Ppl
3. Talks
4. Role that does nothing
5. she/her
6. they/them
7. any pronouns
8. ask pronouns```
Please type the numbers corresponding to your selection, separated by commas, or type `c` now to cancel. (E.g. `2, 3, 5, 7, 11`)
Removed the studying! role from you.
Selfrole selector timed out, your roles were not updated.
<@&268886789983436800>
Was something perhaps deleted?
I'll take a look, there is a bit of a delay
Just some bot command spam it seems. @unkempt warren please use #bots for bot spam and never delete messages once a mod ping is made.
This Galerkin approximation is using the same basis for test functions?
Yes the phi_i in 1.5.5 and 1.5.6 are the same as in 1.5.1
Thank you!
I am doing a thing with legendre polynomials, for that I need the first derivative. I found this SO question:
https://math.stackexchange.com/questions/4751256/first-derivative-of-legendre-polynomial
Which states that the first derivativeof the basis element n is
$P'n = \frac{n(P{n-1} - xP_n)}{1 - x^2}$
And that cannot be right.
First basis element is 1 second is x
So derivatives are 0 and 1 respectively. Even assuming that if you assume that $P_{-1} = 0$ neither derivative fits the statement
For x the formula would tell you $(-nx / (1- x^2))$ which trivially cannot give you 1
Makogan
So what am I doing wrong?
The formula holds for n>=2
do you know of a place that has the proof in a straightforward manner?
The MSE post has the proof in the answer
It assumes background context I don't have, such as teh generating function
I don't know what you mean
Idk where this is coming from
Read any standard treatment of legendre polynomials
The answer in MSE relies on something called the generating function. The definition of Legendre polynomials I am working from is a recursive definition
The recurrence relation is derived from the generating function
This is very normal
Yes but I have no formal training in any of this and no one to ask direct questions to. For example, from the wikipedia entry:
https://en.wikipedia.org/wiki/Legendre_polynomials#Definition_via_generating_function
That statement seems arbtirary.
The first two terms in the sum are $P_0(x) t^0 + P_1(x) t^1$
How the text jumps from there to asserting that $P_0 = 1$ and $P_1 = x$ doesn;t seem like a given based on the defnition.
I don't doubt it;s correct, but I don't see why it is
Do you know how generating functions work
All I have is the definition from the wikipedia link. As mentioned I have no formal training in any of this.
You are, of course, welcome to ask direct questions here
I do not know how generating functions work
To get $P_n$ from the generating function, take $\frac{1}{\sqrt{1-2xt+t^2}}$ and perform the Taylor series expansion in $t$
Angetenar
Angetenar
taylor series centered where? Mclaurin series?
Centered at 0
ok so the Mclaurin series, thank you, let me think a bit
follow up question, why is the generating series the generating series?
i.e. why is that the specific expression that was picked to generate the legendre polynomials?
In mathematics, Legendre polynomials, named after Adrien-Marie Legendre (1782), are a system of complete and orthogonal polynomials with a wide number of mathematical properties and numerous applications. They can be defined in many ways, and the various definitions highlight different aspects as well as suggest generalizations and connections t...
Gravity

Follow up, trying to understand how they are deriving this step from the prior:
why are those two expressions equal to each other
oh I think I get ti
the equality follows from algebraically manipulating the generating funciton and its derivative
so that they look the same
Yes
It arises naturally in calculating the integral kernels of the orthogonal projection operators onto eigenspaces of $-\Delta$ on $S^n$ (Legendre is $n = 2$). See page 130 of https://link.springer.com/book/10.1007/978-3-031-33700-0.
L
Sorry for the spam. Stuck on this step:
I don't see how that derivation follows form the antecedent
Distribute the 1-2xt+t^2, equate equal power of t
Ah by the fact that polynomials are euqal iff their coefficients are euqal
Still stuck here. I managed to get three of the terms, not the last one.
I get where the RHS comes from.
I get where most of the lehs equality comes from.
But it seems that I should get a non zero residual?
i.e. I distribute (1-2xt+t^2) giving me 4 sums.
Two of those sums have matching powers of t^n+1, equality is trivial.
Then one sum is overt t^n+2 and one over t^n
So most terms in the polynomial over t match by shifting every two. That gives (P'_(n+1) + P'(n-1)) t^(n+1) to equate to the rhs.
But then there's some elements in the lhs with no match?
oh this is abusing the fact the sum has countably many elements?
Right that;s why I seem to have a residual
This is just hilbert's hotel
yes?
Final question tha tis a bit tangential to all of this.
I know the quadrature rule for Legendre polynomials:
https://en.wikipedia.org/wiki/Gauss–Legendre_quadrature
But it feels that if I am doing the inner product, i.e.:
$\int P_n(x) f(x) dx$
For each basis polynomial (i.e. extracting the coefficients of the hilbert space) there has to be a simplification with the $w_i$, no?
Makogan
You're doing this on [-1,1] right
If you do a method where you break up [-1,1] into many sub intervals, then no simplification occurs
If you do it on the entire interval, then if P_n matches the quadrature degree chosen, the integral for P_n vanishes
why would it vanish? is it not dependent on what f actually is?
say for example taht f = 1/x. that would lower the degree of each monomial, that should yield a different answer, no?
If you are doing a degree $n$ Gauss-Legendre quadrature, then you approximate $\int_{-1}^1 P_n(x)f(x)dx\approx\sum_{i=1}^nw_iP_n(x_i)f(x_i)$ and $x_i$ are the roots of $P_n$ so $P_n(x_i)=0$
Angetenar
Oh fuck, yeah you are right...
How on earth do you do that projection then?
i.e. what is an effective way of projecting f into the legendre basis?
All the paper I have on hand says is this:
Which is not terribly useful
The goal is to extract the coefficients of the Legendre basis:
I am getting more and more tempted to just do the naive sum and delta
but that's gonna be highly inaccurate
Yes quadrature degree 4p
So that you don't have the above problem
You can also do something like a midpoint rule or simpson's rule and break up the interval [-1,1] into many subintervals
if I use simpson's rule then it;s no longer a gaussian quadrature is it?
Do you need to use a gaussian quadrature
idk, the paper uses that and I am reticent to deviate
this is part of an algorithm that;s going to be approximating very complex functions
Well the paper is using a gaussian quadrature of degree 4p
so I want to be both accurate and fast
While you only compute legendre coefficients up to degree p
So you don't have the cancellation problem
I am probably miss understanding both you and the paper.
What I was trying to do is $\sum ^n_{i=1} w_i f(x_i) P_n(x_i)$
with n = 4p
Makogan
which as you pointed out is wrong
At any rate, I think that adaptive quadratures are better for complicated functions
You compute $<P_n,f>=\int_{-1}^1P_n(x)f(x)dx$ for $n=1,\ldots,N$. The paper approximates this with $\int_{-1}^1P_n(x)f(x)dx\approx\sum_{i=1}^{4N}w_iP_n(x_i)f(x_i)$ where $x_i$ are the roots of $P_{4N}$
Angetenar
Be careful about the indices
You are probably correct and that would also lead to better handling of discontinuitiees. I am probalby going to go with Simpson;s rule due to simplicity of coding.
Let me read
Oh!
I said nothing
I get it
Thank you
Final question, this is going to be approximating highly complex functions, like the ones int he image. And I need to try to update the coefficients as fast as possible.
Simpson;s rule is nice in that it's dumb simple to code, but I worry about eneding a large number of sub intervals to get good accuracy.
how do I pick the interval?
Start with a base spacing Delta x
In each interval of size Delta x, estimate the error of the quadrature method
If the error > some threshold, split the interval in 2
Hmmm, that might be too computationally expensive. I will read a bit more into other numeric integration methods and see what I get.
Thank you enormously for patiently helping me btw
I appreciate it
Follow up, I know that there exists a tridiagonal matrix whose eigenvalues yield the nodes of the quadrature rule of order n.
But I have been unable to find a resource stating what that matrix is
does anyone know?
Golub-welsch algorithm
thank you!
Am I correct that, in the Legendre basis, $b_j$ is 0?
Makogan
For the Golub-Welsch algorithm?
The resulting matrix would have 0's in the diagonal if that's the case, so I am doubting myself
In their article, they relate $b_j$ and $\alpha_j$ with:
Then $\alpha_i$ can be computed with 4.3:
And $r_ij$ are the entries of the cholesky decomposition matrix of what they call the Gram matrix
For bj to be zero, alphaj needs to be zero. But for me its not obvious why this would be the case, at least looking to this problem from this perspective. What makes you think that the bj coefficients are zero?
There also might be a simpler way to compute the roots of the Legendre Polynomials. I think I did this once and computed the roots with newton's method and the weights have a formula on wikipedia.
I trust the eigenvalue method more. It doesn't ned an initial guess
I am using this writeup since it's more condensed:
https://paulklein.ca/newsite/teaching/cookbookintegration.pdf
but if I am reading things right the b_j here would be 0
For the Gauss-Legendre quadrature, in section 4, indeed it seems so that bj =0, but I'm not sure why.
If I have some time tomorrow, I can take a look at this.
But im guessing you'd need to take expression 4.3 of Golub's article and work out why the two terms of the lhs cancel each other
By using the definition of r_ij for the case of the Legendre Polynomials.
at least we are in agreement
thank you so much either way. i appreciate the help
I can confirm, experimentally that the bj are 0
We are glad to announce that the University of Pisa has launched a new interdisciplinary industrial PhD program in High-Performance Scientific Computing (HPSC) with 4 fully funded positions open for applications (EU and non-EU), starting November 2025.
This innovative doctoral program is designed in collaboration with the medical technology company Sordina IORT Technologies, and brings together 8 university departments and several national research institutes. It focuses on the development of advanced computational methods and HPC-based solutions for complex problems in science, engineering, and medicine.
Specific research topics for the funded scholarships include:
- Iterative Methods and Preconditioners for Sparse Linear Systems on Pre-Exascale and Exascale Architectures
- HPC Software for Design and Analysis of Electronic Devices using Advanced Materials and AI/ML
- Computational Models for Flash Radiotherapy and Radiobiological Applications (2 positions)
- Reduced-Precision and Matrix Units on AI GPUs for Efficient Solution of the Wave Equation
The program offers a unique interdisciplinary environment where PhD candidates will develop expertise in:
- Numerical algorithms and scientific computing
- HPC architectures and parallel programming
- AI/ML techniques applied to physical and biomedical systems
- Application domains such as climate modeling, advanced materials, and smart medical technologies
This is an industrial PhD: selected candidates will have the opportunity to work closely with Sordina IORT Technologies on translational research projects in medical computing and radiotherapy, ensuring both academic excellence and real-world impact.
Application deadline: July 18, 2025
Program website and full call: www.dm.unipi.it/phd-hpsc
We welcome applications from outstanding Master's graduates in mathematics, computer science, physics, engineering, chemistry, and related fields.```
Hello
Is anyone familiar with clenshaw-curtis quadrature
I've found two online sources which present two different sets of weights
An article by Bailey, Jeybalan and LI, "A comparison of three high-precision
quadrature schemes", and available online
here, compares
Gauss-Legendre …
These weights are not the same!
Oh wait
Lol
These are for different sets of nodes
Lol
Nevermind
Hi
Would like some advice or inputs on how I can tackle this issue I've been facing
Now I need to solve the 2d viscous burgers equation using a semi lagrangian method for the material derivative and fem for the viscous term.
Now the problem I've been facing is this: I do not have a velocity function for calculating the departure points. I have only the initial and boundary conditions available to me and I need the velocity function for me to be able to use rk4 or a suitable time integration scheme to calculate the departure points.
How do I do this😔
What do you mean you don’t have the velocity
😃 I've figured it out pls ignore

I was the problem. It was me 😩😔

This is perhaps a dumb question but my brain is fried.
How can I generate all tuples of integers representing the basis of a 3dimensional space of polynomials of degree p.
i.e. a tuple of three integers such that i + j + k < p.
For exmaple for p = 2
1, x, y, z, xy, zx, yz, z^2, x^2, z^2
Three nested loops
This right?
for i in 0..=degree
{
for j in 0..(degree - i)
{
for k in 0..(degree - i - j)
{}
}
}
Yes
ty
Disregard this matrix is written incorrectly
Hello, currently studying FEM and looks like I need to study some things in detail.
Does anyone have any book recommendations for:
1-) Explanation of the mesh generation process using triangular/quadrilateral elements in 2 & 3D,
2-) FEM using MATLAB which makes use of mesh generator functions and solving of problems with large elements so that I may better understand the whole process (boundary conditions, mesh generation, etc).
The book I'm following only solves problems for 1-2 elements so everything is done manually. It is great for a beginner in FEM though but I believe it is time to read other books as well.
Thank you.
- https://onlinelibrary.wiley.com/doi/abs/10.1002/pse.135
- Is this more about the implementation
Anyways also maybe read Finite Element Analysis: Method, Verification and Validation by Szabó and Babuška
could someone explain what analysis is about 💀
Yes to the implementation part, and thank you for the reply.
This is from Brenner & Scott, which lacks an errata
Is this problem posed right? This definition of phi-epsilon just doesn't seem right
phi^epsilon has completely unrelated support?
and this support changes over epsilon
further, I believe that claim of the identity is untrue
but I can't verify it
Equation 5 in this paper is wrong right? the Gauss-Legendre basis is merely orthogonal , not orthonormal. So that term needs to be normalized, right?
They are working with a normalized basis
Sentence before eq 4
I should learn to read more carefully
About 2, search for this book:
The Finite Element Method: Theory, Implementation, and Applications
This is the book I used when I was learning FEM and I liked it.
They give code snippets in matlab
@fathom otter Thanks.
Mathematical software has traditionally been built in the form of "packages" that build on each other. A substantial fraction of these packages is written in C++ and, as a consequence, the interface of a package is described in the form of header files that downstream packages and applications can then #include. C++ has inherited this approach t...
Does anyone have a good reference on stability for the Newmark-beta method? In the engineering texts they are only stating the stability without any proofs.
Question, is there a relatively simple way for me to test the numeric coefficients of projecting a torus SDF onto a multidimensional Gauss-Legendre basis?
I coded that exact thing and the results I am getting are not right. So I need to figure out what the problem is. But if I have to code something very complex to compare coefficients, might as well just debug the code I already have.
like, I have the definition of everything math wise, I just want to know if there is a sympy based library or something of the sort I can quickly spin to check if I get the same numbers
Hand compute some values
oof...
That has to fall under some clause of the Geneva conventtions
Lol yes
The worst hand computation I've had to do was proving RK4 for vector functions
Can someone help me with the exercise 14.3? I couldn't do it.
What are you having trouble with in particular? What have you started, what have you tried, etc.
I’m looking for the answers for exercise 14.3, the solutions for it.
This isn't really the place to just get answers to problems
which is why I'm asking about what you're stuck on so I can help
Can you do it?
Sure, I can solve it, but I won't just give you the solution
There's nothing to be learned there, but also I'm lazy and don't want to write the code associated with it on my phone
I don’t trust you, you will use ai
This is university mathematics, specifically used for master degrees or bachelor.
but to get back on topic, what about this problem is causing you difficulty?
@wanton skiff Best to take a 3x3 matrix and do everything by hand, you'll notice how you use the function (which you have to code) over and over again
Thank you
Will do, of course.
Hey what is the difference between numerical analysis and real analysis or what is numerical analysis only
Numerical analysis is essentially studying how to practically compute objects often seen in analysis and linear algebra while understanding how error propagates from approximation.
Many problems in analysis have solutions that are continuous, but computers only work in a discrete setting so ways to get approximations are fairly important
Hello. I have a system with roughly 35 variables that need to be determined. For now I am using the monte carlo markov chain to try to get them. The problem is, there are first six conditions that must be satisfied and if they arent the code return a likelihood equal to -inf. I know that this is a high dimensional problem, but I already got millions and millions of attempts, more than 40Gb of data and all the values return with a likelihood of -inf. How can I change the way I am doing this to improve the results or I just need to wait for the code to find one point where it actually passes through all 6 conditions?
Are you trying to solve a system
Or optimize
Is it linear or nonlinear
What form do the constraints take
Hello i need help
Im using a modified newton's method to find a root for initial values p0 = 0.35, and p0 = 0.95
for 0.35 i found the root to be 0.5, and 0.95 i found the root to be 1
however after asking AI i got confused since they mixed answers for p0 = 0.95 because 1 can or cannot be a root or they called it a false root because it would make f'(x) = 0 im looking for some explanation for this
I probably wouldn't recommend asking AI for help with this. What do you mean by "1 can or cannot be a root"?
i was asking deepseek and chatgpt to compare and both gave differing results.
chatgpt said p0 = 0.95 does not diverge
deepseek said p0 = 0.95 converges to 1
so i asked chatgpt about it, it said it is converging to a false root
Yeah I mean, you've experienced firsthand the reason I wouldn't recommend asking AI - it's not a search engine and it's not gonna give you consistent/good answers. Your Newton's method told you there's a root at 1, and plotting the original function shows that's the case. It happens to also be true that f'(1) = 0, but that doesn't change the fact that f(1)=0
I guess I'm just a little confused on what you need help with - were you trying to get the AI to do the convergence analysis part for you, or just verify that your code worked?
Both kinda, i tried to get the AI to do convergence analysis but i also wanted to see if my code worked (also made by ai)
I kinda dont know what to think whether p0 = 0.95 should be converging or not or diverging or whats suppose to happen. I guess im kind of trying to like check my work
So you're using AI to check the work that was also done by AI? Lmfao
I think you would probably be able to understand the assignment better if you didn't outsource all of the work for it
Gotcha. Well, if you try it again yourself I'll be happy to help you figure it out, but I don't really want to help ChatGPT do your homework for you. Good luck though
Thank you for trying to help
Very naive question. I ahve a quadrature rule defined on [-1, 1]. And I am using it to project a function onto a function basis.
Say $\int^1_{-1} f(x) \phi_i(x) dx$
Makogan
Since my basis is defined on that interval, my quadrature rule becomes:
$ \sum w_j f(x_j)\phi_i(x_j) $
Now, say that f is instead defined on some arbtirary interval [a, b] and I want to do the same procedure
How should I modify my quadrature values?
for both?
or only for f?
sorry replied to the wrong comment
x_j -> (b+a)/2 + (b-a)/2 x_j
Do I normalize the nodes only for f or do I also normalize them for phi?
@next garden Is this in FEM context? just curious. Btw yes
Surprisingly no, although that;s what I usually do. The actual algorithm is trying to simplify an SDF by decomposing it into an oct tree of Legendre basis
So I am not solving a differential equation or anything of the sort
I am just changing the represnetation of an SDF into a nicer one for a computer toe valuate
Signed distance function
It's an implicit representation of a surface
I see
The english definition is, given a surface, the SDF gives you the euclidean distance from any point on the space to its closest mathc on the surface
except that the distance is positive if the point is outside the shape
and negative if the point is inside the shape
It;s extremely popular for physics simulations
paritcularly fluids and raytracing
I was just reading on how meshes are generated for FEM and I did come across sdfs, okay. Forgot the abbreviation.
because you can easily comput things like penetration depth and pushback forces
I am however not gettign what I expect from my implementation
I tried projecting the function 1 into the legendre basis of [-1. 0]^3
and I am getting non zeros for the coefficients of the non constant legendre vectors
so clearly
my implementaiton is borked
:C
what do you mean by this? replacing x in the function with the transformation?
So, by default, the legnedre basis is defined in [-1,1]
You can extend that to multiple dimensions by making a tensor product
that gives oyu a basis in [-1,1]^3
i.e. the cube centered at teh origin with sidelength of 2
that part works
I tested that basis with many toy polynomials and the projection gives me the same as the ground truth
But if I try any other domain (and trying to shift and re-scale)
so e.g. if I try to define eveyrhting to projet properly on [-1, 0]^3
It no longer works
despite me trying to scale things appropriately
So follow up on this tuff because I am still kinda stuck:
I am trying to solve the following problem. Assume we have defined the one-dimensional, normalized, Legendre basis as:
$$ \sqrt{\frac{2 \rho + 1}{b-a}} L_\rho (x)$$
Where $\rho$ is an integer denoting the degree of the polynomial.
This is an orthonormal basis defined on $[-1,1]$. Now, take the associated quadrature rule:
$$ \int^{1}_{-1} f(x) dx\approx \sum w_i f(x_i) $$
What we seek to do is project a function onto the basis, i.e. we seek to do:
$$\int^b_a f(x) L_\rho(x') dx$$
For each basis vector, where $x'$ is shifted and normalized from $[a, b]$ into $[-1,1]$.
Makogan
We further seek to extend this to multiple dimensions, in particular, three. So define:
$$ \int^{b_1}{a_1}\int^{b_2}{a_2}\int^{b_3}{a_3} f(x', y', z') L{\rho_1}(x)L_{\rho_2}(y)L_{\rho_3}(z) dxdydz $$
i.e. we have extended our one-dimensional basis into three dimensions by multiplying together, tensor style, the one dimensional polynomials. And we are now projecting our function onto that basis.
Now we want to come up with a quadrature rule for this setting. If we assume that our bounds are $[-1,1]^3$, this is not so hard, we can just do:
$$ \sum_{(i, j, k) \in [0, n]^3} w_i w_j w_k f(x_i, y_i, z_i) L_{\rho_1}(x_i)L_{\rho_2}(y_i)L_{\rho_3}(z_i)$$
Where $x_i, y_i, z_i$ are the points of quadrature.
I have code that implements the above and it works, tested it.
The part I am struggling to adapt is getting the correct values for when $[a,b]$ are not $[-1, 1]$.
What I thought would work is:
$$ \sum_{(i, j, k) \in [0, n]^3} w_i w_j w_k f(x_i', y_i', z_i') L_{\rho_1}(x_i)L_{\rho_2}(y_i)L_{\rho_3}(z_i) \frac{b_1 - a_1}{2} \frac{b_2 - a_2}{2} \frac{b_3 - a_3}{2}$$
i.e. grabbing the nodes $x_i, y_i, z_i$, shifting and scaling them to fit their respective bounds, then evaluating the Legendre polynomials on the standard nodes, the actual function on the shifted and scaled nodes, then re normalize by scaling down the result due to the change of bounds for the integrals. This is not working.
For example I tried to simply project the function $f(x, y, z) = 1$ and I got non zero coefficients for almost all projections. When, due to orthogonality, the expectation is that only the first one, corresponding to the constant basis function, should be non-zero.
[1.0000000000001648, 5.1961524227072, 5.196152422707172, 5.196152422707172, 46.95742752750177, 27.000000000001915, 27.00000000000192, 46.95742752750183, 27.00000000000194, 46.9574275275018, 484.1724899248873, 243.99795081108888, 243.99795081108883, 243.997950811089, 140.29611541308253, 243.99795081108905, 484.1724899248869, 243.99795081108888, 243.99795081108877, 484.1724899248873, 5355.000000000783, 2515.834056531001, 2515.8340565309986, 2205.0000000002524, 1267.8505432424427, 2205.000000000252, 2515.834056530996, 1267.8505432424427, 1267.8505432424429, 2515.8340565309945, 5355.000000000786, 2515.8340565309973, 2205.000000000254, 2515.834056530996, 0.0]
I am stuck, I was hoping someone could lend me a hand to understand what I did wrong.
Makogan
@next garden Sorry I'm still a bit confused. Your main task is to find $\int_{a}^{b} f(x) L_{p} (x) \dd{x}$ for each $L_{p} (x)$?
Sup?
the main task is doing that but in 3D
so L_p is really a polynomial in three vairables that is constructed as a tensor product of Legendre polynomials in one variable
@next garden Couple of questions just for my clarity lol.
The L_p here, is it the original L_p defined on [-1,1] or is it the one that you have shifted to [a,b]? If L_p is the original, then the integral is only defined if [a,b] is within [-1,1]. If this is the case, then you can easily transform from your [a,b] (which is within [-1,1]) to [-1,1] for the quadrature by applying the transformation to both f and L_p and changing the limits of the integral and also scaling dx, dy, dz, etc appropriately. If L_p is already shifted to [a,b], then the integral is defined so you can just apply quadrature directly.
I guess teh notation there is poorly done.
Assume on 1D our basis is actually:
here L_\rho is the stnadard [-1, 1] Legendre polynomial. x' is a normalized coordinate, where x \in [a,b] and x' in [-1, 1].
b and a are just the bounds of a one dimensional interval.
the one dimensional quadrature jsut requires the scaling factor from this comment
so you grab that expression I just shared and do quadrature on f(x) times it
the part I seem to have made a mistake is teh generalizaiton to 3D
Finally!!!
left experiment right ground truth
jesus that was an annoying bug to track
Not even sure if this is the right place to ask this, but has anyone here used Fenicsx before ?
yeah I tried to and honestly don't there are much simpler tools
Simpler under the terms of what? The package is well conceived in the math community as far as I know. It hides the internals of the FEM implementation (for example) and focuses on the variational formulation itself
I was not particularly fond of the FEniCS documentation back then
Maybe they updated it by now, but before, there were so many things that were outdated
I have a theory with a large number of variables to be determined. I am using markov chain monte carlo. Is there a better method?
what if he discovers one
fields medL
could I have a hand with this exercise? I'm really struggling to come up with basis functions for this space
here's the piecewise linear case
but im not too sure how to extend this
i thought about maybe cooking up functions phi_j that were just -(x-x_{i-1})(x-x_{i+1}) and then rescaling the height but it doesnt really work
@steel shard I can recommend a book (there probably are many, I happened to read this one) which derives the basis functions.
If you want to do it yourself, good.
Work with local coordinates. We have an element which now needs three nodes and three functions. Each function is a quadratic function, so the original function, say V, is a linear combination of the three quadratic functions on that element. V^(e) (x) = V_1 phi_1 + V_2 phi_2 + V_3 phi_3, where the phis are our quadratic funtions and V_is are the values of the original function at the nodes. Obviously summing quadratics gives us a quadratic, so we have V^(e) (x) = a0 + a1 x^1 + a2 x^2.
Now we use the definition of the basis functions. We have that V^(e) (0) = a0, V^(e) (h/2) = a0 + a1 (h/2) + a2 (h/2)^2 and then carry on similarly for V^(e) (h). Solve this system of equations for a0, a1, a2. Substitute the a_i back into V^(e) (x) = a0 + a1 x^1 + a2 x^2 and then rearrange so that you get V^(e) (x) = (some function 1)V_1 + (some function 2)V_2 + (some function 3)V_3. Remember that V_1, V_2, V_3 = V^(e) (0), V^(e) (h/2), V^(e) (h). Then you get your basis functions from some function 1, some function 2, some function 3.
The Finite Element Method: Basic Concepts and Applications with MATLAB, MAPLE, and COMSOL, Darrell W. Pepper, Juan C. Heinrich.
ohh ok very interesting, thank you!! that middle node was the key piece i was missing
that's very cool
thanks again!
Does anyone know if there is a theory for defining orthogonal polynomial basis functions for arbitrary convex polyhedra?
No
Seems tough, you might want to look into the finite element literature
Anybody here particularly apt at numerical linear algebra? Just curious, I'm doing research on it and have yet to really run into anyone has done alot of it before
I do, but in a very niche subject
what subject?
structured matrices mostly
so wait is that like, tridiagonal, hessenburg and such?
Am I think of the right thing, google was unhelpful lol
You ever do much with krylov subspace methods?
no
rip lol
I am finding them interesting, but quite hard to actually code and to find information on
it also seems like alot of them just aren't done being researched
there is quite a bit of research in that direction
thanks for the info, I'll look into it more, but it almost instantly went over my head lol
a lot of it for me too 🙂
If you have specific questions just ask 
have you ever dealt with arnold or lanczos iteration?
Yes
I'm starting a numerical analysis course this fall, does anyone have advice for how to prepare or work through the course? Its being taught by a notoriously strict professor.
I'd probably need more info about how the class is structured and what you'll actually need to do? Or do you mean in terms of material to review ahead of time
I mean in terms of material to review ahead of time
I currently do not know how the class is going to be structured
No problem. I'm assuming its a first course? Probably linear algebra and real analysis (if applicable)
If you happen to know what book you'll be using I could probably say something more specific but it'll generally boil down to those two things. And you wouldn't need to review anything terribly difficult from either of them, iirc
The professor is a bit of an interesting person, and provides his own materials for his classes, so we don't have access to the materials until he gives them to us lol so we most likely won't have a textbook
what i safly discovered in practice is that for larger matrices the simpler krylov methods are too unstable and require far more iterations than supposedly required 😔
i suspect they are only really effective for very large sparse matrices
they are cool though
Did you check the condition number of your matrices
they werent too bad iirc, they were just 8x8 dense matrices
other methods did show better results too
although they were not as lightweight as krylov 😔
Lmk what you find
Gemini excerpt: Key Names and Terminology
This is an active area of research in numerical analysis and approximation theory. If you want to read more, look for these terms and researchers:
Dubiner Polynomials: The foundational basis for triangles and tetrahedra.
Koornwinder Polynomials: A general class of polynomials on simple domains.
Warp and Blend Mappings: A specific technique for constructing the geometric maps.
Spectral/hp Element Method: The primary field of application. Key figures who have developed this theory include George Karniadakis, Spencer Sherwin, and Robert Kirby. The open-source code Nektar++ is a major implementation of these ideas.
Thank you enormously for these resources
II will try taking a look
Depends a lot on what you will be specifically doing during said course, but I can tell you that linear algebra was consistently pretty useful during my two Numerical Analysis courses.
Some calculus knowledge also helped.
If you also know on which software you will be coding, you could familiarise yourself with it in advance, so you don't need to lose time learning how it works.
Does anyone feel satisfied with the Nitsche penalty method
Thanks!
is the hp element method essentially a tree subdivision of your space with varying degrees of polynomials?
Yes
idk if this is the right channel for it, but does anyone know and understand how CORDIC works?
What part do you not understand
Rotation mod is fairly simple
You start with (1,0) and multiply it by a set of rotation matrixes
with each iteration getting closer to the desired angle
The angles are chosen in such a way, that multiplying by rotation matrix is very simple in binary representation
interesting
Question. I have two functions, an approximating function, let;s call it $\phi$ and a ground truth function, let's call it $f$.
I want to know how much $\phi$ deviates from $f$, analytically that's just a simple integral of a difference $\int || f - \phi|| dx$
The problem is that $f$ is ridiculously expnseive to evaluate, so quadrature methods that attempt to give me high levels of accuracy take a lot of time. What altenratives do I have, if any?
Makogan
I can't think of any options really. Any measure of the deviation of f from \phi will involve evaluating f.
Depending on f and on the integrand norm(f-phi), there should be an optimal quadrature rule that will give you the best order of accuracy with the least evaluations of f.
How important is that you measure the difference with the integral and not with another measure, say |sup(f) -sup(phi)|?
not important. The use case is for an algorithm to decide if it should do more work or not. So really I just need a way of estiamting the deviation with as few calls to f as possible
What do you know about the regularity of the function
Do you know anything about the derivatives
that it's an SDF, that;s about it
I can make little assumption about even smoothness in the strict sense
I think your best bet is a trapezoid rule quadrature
So that at every iteration step you can reuse all the previous function evaluations
Is that not true for any quadrature rule? The quadrature points should be constant across iterations right?
Not all quadrature rules reuse points when shrinking the grid spacing
So the grid spacing would be changing across iterations, I see.
Im not familiar with this problem
Why is it so expensive to evaluate f anyway. You just need to evaluate the signed distance of the quadrature points to the boundary, right?
Romberg might help too
well for example say your f is actually a high resolution mesh. For each evaluation of f you are doing a tree traversal, checking for bounding box inclusion and potentially even backtracking up the tree due to near misses. The worst asymptotic time for a BVH queary is O(n), and youa re doing that for each individual query. Not fantastic...
What is romberg?
I will try that out then, ty
Tangentially related but I realized a limitation of I think any quadrature rule?
Say my basis is an orthonormal polynomail basis,
Assume p_i is one element of my basis with i really big.
then for ALL finite basis with j < i, the projection of p_i onto te basis is 0 (due to orthogonality)
but that doesn't mean my method has converged
Anyway to try to estimate what I wouldbe without testing until I find the right index?
This is more personal curiosity I don;t think it will be a problem in practice
Right thanks for the clarification
Also check out Richardson extrapolation
Use a lower order quadrature like midpoint
Romberg integration is Richardson extrapolation + trapezoid rule
Now when I think about it
Doesn’t Richardson extrapolation rely on function having continuous derivatives?…
It might not work in your case
The integral should have a continuous derivative
Why is the best uniform approximation problem particularly interesting? For example, say I have a function f on a real interval J with real values and I want to minimize |f-p|_inf for some polynomial p where |.| denotes the L inf norm.
For context, I found an entire book about these problems that sure seemed to suggest this is a fundamental problem in approx theory but I can’t tell why this “norm” is particularly interesting.
I suppose I should mention adaptive Gauss-Kronrod-Patterson in passing. But what I myself am trying to do is characterising polynomials positive on the compact interval not representable as convex combinations of Bernstein polynomials of matching degrees. But I can’t even produce an example of such a polynomial.
It means the error can never exceed that norm in absolute value.
Are you familiar with why people care about L inf error bounds
No I’m not I mean to ask that
Should I be asking my Bernstein polynomial question in a different channel?
I tried $\int_0^1\left(\sum_{k=0}^n(p_k-c_k)\cdot B_{n,k}(x)\right)^2,dx$ and got closed forms for the integrals of $\int_0^1 B_{n,m}(x)\cdot B_{n,k}(x),dx $ but they didn't really give any insight into whether the Bernstein sum $\sum_{k=0}^n c_k\cdot B_{n,k}(x)$ with $c_0, c_n > 0, (\forall k) 1\leq k < n,,c_k \geq 0$ could successfully reproduce a degree $n$ polynomial $p(x)$ positive on $[0,1]$.
Nadia/Надя/नादिया/娜迪亚/ نادية
I'm not quite sure what your question is
Do you know why analysts care about L inf bounds
Why uniform convergence is important
I have no idea why analysts care about L inf bounds rather than say, L2 or L1 bounds. I know the definition of these norms and that there is some duality between L inf and L1 but I have no ideal why analysts care about L inf in particular.
You should think about this
Why is uniform convergence better than pointwise convergence
I know that L inf is a stronger quality of convergence.
I don't think they really care that much, but to have a pointwise error bound guarantee for discontinuous functions is very good. See https://en.m.wikipedia.org/wiki/Gibbs_phenomenon
In mathematics, the Gibbs phenomenon is the oscillatory behavior of the Fourier series of a piecewise continuously differentiable periodic function around a jump discontinuity. The
N
{\textstyle N}
th partial Fourier series of the function (formed by summing the
N
...
Characterising polynomials positive on the unit interval not representable as convex combinations of Bernstein polynomials.
Ah okay. I have been studying haar spaces and was hoping to see some applications of these. A Haar spaces is certain finite dimensional vector subspaces H of the real valued continuous function C(J,R) on a compact real interval J. Haar spaces are characterizing as exactly being the finite dim vector subspaces of C(J,R) which have a best uniform approx property. So for example any g in C(J,R) has a best uniform approx in span (cos(t),sin(t),cos(2t),sin(2t)).
Maybe it’s a niche topic but maybe it’s useful in signal processing for all I know.
The convex combination restriction is pretty harsh
For example, consider f(x)=1
This is only expressible as a convex combination for deg 0 bernstein polynomials
f(x)=c for c>1 is not expressible as a convex combination of bernstein polynomials
Hmm. Given that what I'm hoping is for a non-vanishing denominator of a rational function, it may be that I bungled by not restricting the polynomials or modding out factors of the sums of absolute values of coefficients or similar. I think because the Bernstein basis spans the polynomials of the relevant degree, I think it may be a difference of $\sum_{k=0}^n\left|c_k\right|=1$ with and without the additional restrictions of $c_0,c_n>0$ and $(\forall k)0<k<n,,c_k\geq 0$. This is when considering a polynomial $\sum_{k=0}^n c_k\cdot B_{n,k}(x)$ where $B_{n,k}(x)=\binom{n}{k}\cdot x^k\cdot (1-x)^{n-k}$.
Nadia/Надя/नादिया/娜迪亚/ نادية
@wide spear So it seems to be coming down to whether $p(x)>0$ on $[0,1]$ is possible when some of the $c_k<0$ for $0<k<n$. Clearly $c_0=0$ or $c_n=0$ yields a zero at one of the endpoints of $[0,1]$, failing the strict inequality criterion and $c_0<0$ or $c_n<0$ yield negative values at the endpoints of $[0,1]$ which trips over intermediate values needing to go through a zero before becoming positive anywhere.
Nadia/Надя/नादिया/娜迪亚/ نادية
Ok so you have some rational function? And you want the denominator as a Bernstein basis and want conditions on the coefficients for no singularities?
Or are you trying to approximate another function by a rational function?
Conditions on the Bernstein form of the denominator for no singularities within the interval, or at least to understand the way it fails to cover the whole space.
A sharp condition is always welcome.
Ultimately it feeds into trying to get sharper bounds on the error of a $C^d$ piecewise rational approximation on an interval than Gelfgren got in 1975 and 1978 by using real analysis vs. his complex methods.
Nadia/Надя/नादिया/娜迪亚/ نادية
Well each bernstein basis polynomial is positive except potentially at the endpoints right
So I think that c_n > 0 for each n should be necessary and sufficient
I think the interior coefficients might be able to go negative.
$\min_{x\in[0,1]}c_0\cdot(1-x)^n+c_n\cdot x^n$ is when $n\cdot(c_n\cdot x^{n-1}-c_0\cdot (1-x)^{n-1})=0$ so $\left(\frac{x}{1-x}\right)^{n-1}=\frac{c_0}{c_n}$ so $\frac{x}{1-x}=\left(\frac{c_0}{c_n}\right)^\frac{1}{n-1}$ so $x=1-\frac{1}{1+\left(\frac{c_0}{c_n}\right)^\frac{1}{n-1}}$ which with $c_0,c_n>0$ falls within $(0,1)$, at which point I think there may be room for negative $c_k$ for $0<k<n$.
We develop a new kind of nonnegativity certificate for univariate polynomials on an interval. In many applications, nonnegative Bernstein coefficients are often used as a simple way of certifying polynomial nonnegativity. Our proposed condition is instead an explicit lower bound for each Bernstein coefficient in terms of the geometric mean of it...
Have you seen this
Nadia/Надя/नादिया/娜迪亚/ نادية
Checking it out.
That's great.
Any references that you recommend for numerical PDE ?
Thanks you for that .
I think something that had quantum
mechanics in consideration would be great
First become familiar with the various ODE time stepping methods
Aight
I think even numerical methods for SPDEs are based partly on ODE stepping methods.
which book?
Topics in approximation theory by Harold S Shapiro
I know Taubin's matrix is used to extract curvature (normal, principal directions, curvature values...) information from discrete spaces like poitn clouds and meshes. I remember I once read a resource that related all curvature information to the PCA of taubin's matrix.
So for example, if you wanted the direction of minimum curvature, it was the eigenvector associated with the x eigenvalue ordered by magnitude, things like that. Is anyone here familiar with that?
I can't find it anymore
Not sure if that's the right channel to ask (channel description doesn't mention differential equations explicitly, but #odes-and-pdes doesn't mention numerical methods either)
I have a system of first order differential equations, some of them are wrt time, and others are wrt space
I tried a few ways to solve it numerically, and now I'm trying to frame it as a system of differential-algebraic equations
space derivatives are treated as algebraic equations ( 0 = (u[z+dz] - u[z])/dz - u'[z+dz] )
I use Rosenbrock method, and it works relatively well
but it seems there're some instability in region below 200, and with each step the error amplifies (picture below shows one of the components alone the time at different space points)
So the question is...
Is there a way to smooth the solution/any other ways to deal with that instability?
And if you find that approach is a dead-end, please, do tell me, how to handle these problems properly.
Thank you in advance.
Have you tried using a centered difference
No.
I'll report back with the results 🫡
Thank you!
hey guys i was working on some functional analysis , and found a paragraphe about the Bidual space E** of a space E , i can't understand why would we introduce such thing and what is it's importance in FA and EDP ( i wanna do a carrer in quant reaserch )
its an important object of study in pdes and optimization theory, e.g. fenchel duality. reflexivity, which is the property that the canonical injection into the bidual is surjective, is also an important characterization of topological vector spaces (its involved in many central results e.g. kakutani, eberlein smulian)
thanks
The bidual is essential in defining the completion of normed space in a beautiful and succinct way. Also without the bidual we wouldn’t be able to say that taking adjoints preserves the norm, meaning $|| T ||=|| T^* ||$
DazaiOsamu
Actually the isometric embedding into the double dual is just so impressive whichever way you look at it
What is a good way to numerically find roots of polynomial of 5th degree since there is no formula for solutions in radicals
yeah polynomials are friendly there are lots of great options!
There’s a whole Wikipedia article about this
Hello,I have question about numerical methods.When my proffesor do two or three iteration manually he give some table with like 9 iterations.Do I have to do all that iterations manually or is there some method to calculate with table?
You can use a computer
Kinda stuck trying to show that these nodal variables determine P_5
I've shown that if p vanishes under the nodal variables on the edges, that p = q * L_1^2 * L_2^2 * L_3^2
but q thus must have degree k - 6
Which I can't think of how to try to deal with those terms with the nodal variables in the interior
maybe using the largest line through the interior points but I can't seem to show it vanishes "enough"
guys, it is known that the matrix pseudoinverse can be used to solve least squares
for instance, $AA^\dagger b \equiv proj_{Im(A)}(b)$
jeca tatu
but is it possible to interpret geometrically what $A^\dagger b$ alone means?
jeca tatu
What is the dimension of P_5
How many degrees of freedom do you have
How many data points do you have with that triangle
I meant to say P_7 sorry
But the issue is that we have one degree remaining which I’m not sure how to kill off the linear term
I just now realized why the psuedoinverse matters
It’s related to the classical projection defn
So like, let’s say we have a linear map between Hilbert spaces T: A -> B right
Then we have by projection that:
b = T(a) + r for some a in A right, with r being orthogonal to the image of T, i.e T(x) • r = 0 for each x in A
However that is equivalent to x • T^t(r) = 0 for each x in A, thus T^t(r) = 0.
So T^t b = T^t T a
If we can INVERT T^t T, then we have
(T^t T)^-1 T^t b = a, so
T (T^t T)^-1 T^t b = T(a), we’ve projected b onto the image of T via T (T^t T)^-1 T^t
The Penrose psuedoinverse is (T^t T)^-1 T^t, the inverse of T mod the orthogonal complement
In general we can just say T^+(b) = a where b = T(a) + r
Actually wait does this mean that the Penrose psuedoinverse exists for any continuous linear map into a Hilbert space H 
No the image needs to be closed, shit
thats neat
ive always just thought of it as the svd thing
Me too lmfao
I am going to try to keep myself on a regimen
At least 4 exercises every 2 days
good pace, im gonna try to do the same
It's all consequences of the minimization problem which is usually proven by orthogonal projection. You want to minimize some rejection vectors (that's why they're called "least" squares) and generally SVD and SVE in Hilbert space come guarenteeing a regularity condition for both linear systems and operators (the resulting pseudoinverse rely on this framework)
pls guys i'm going insane
it's some divided difference shenanigans
Looks like a barycentric Lagrange interpolation.
I'm not at a computer to write TeX right now, but if you still need help beyond that tip I'll be able to later.
Hi
Anyone can explain why in Inverse power method with shifts one considers a vector x0 out of R(B - lambda I) and not out of R(B - 1/(lambda - alfa))?
Repeated operations project the vector towards the eigenvector associated with the eigenvalue closest to the chosen shift. The primary requirement is that the initial vector has a non-zero component in the direction of the target eigenvector. And therefore, the method converges in this way as an advantage.
It mainly care about the properties of the shifted matrix rather than initial vector you begin with
What's a good reference for a proof of Gaussian quadrature
I know nothing about numerical methods so idk any textbooks
someone can explain this?
I dont see the relationship between QR method and inverse power method
As usually being said a complete discussion of Gaussian quadrature requires a substantial background in Approximation theory. For beginners the book by James F. Epperson (the proof avoids a lot of the need of approximation theory and is based on an idea due to Roy Mathias) and the classic one by Stoer & Bulirsch. For further treatment in the theory I'd recommend Narayan Kovvali
What's stopping me to do this
and this would be 0 since it's for n+2 points and the polynomial x^a has degree <= n
nvm I am completly wrong, found some other formula
Out of curiosity, what did you find?
I've scroled through another book of my proffesor's and there was an exercise to prove the equality between the devided difference of any arbitrary funciton f(t)/(x-t)
which equals L(x0,x1,...,xn,f)(x)/(x-x0)...(x-xn)
tried the proof before again and it was pretty trivial
But now I once again am stuck on another proof
i was thinking generalized Rolle?
