#numerical-analysis
1 messages · Page 20 of 1
maybe what you brought up before with the condition number is why? you're thinking these triangular matrices explode in the limit?

yep, it's not online tho :( (soviet pubs smh)
however, I found another ref, which pointed me to a second ref of his published at a later date 
lol I searched the title of what they gave in the ref
tfw it seems like it's basically just gaussian elimination with more words lmao
literally 

how's TwT and BwB
@short sky can you pin this?
the closure of TwT is the $\bigcup_{w \leq w}$
oWo
davidW

this is central wUw theory
$\hat{\cdot}\overline{TwT}\hat{\cdot}=\bigcup_{Ow\leq wO}TwT'$
Angetenar
@wide spear this proof is somehow even worse than the one in the second paper of his I posted above
Rawr X3
it's literally gaussian elimination but with more cases
@wide spear do you understand what this partial order is
same
How do I prove this? T_n is the n-degree chebyshev polynomial.
Hmmmm
Does it work if you take the projection of x^n onto P_{n-1}?
Where the basis is given by the Chebyshev polynomials
oh yeah i will try that. and since it's the orthogonal projection, it's the best approximation, right?
Yeah something like that
Thanks. I will try that
"My question really would be then if I know how much the total of my heavy side function should be, is there a way to know how much I should inject? For example the total amount should be 25 ug/l after 50 seconds of injection. Is it just dividing the 25 by the 50 seconds? How can I proof this? Sorry if it’s a bit confusing..."
So if you want a concentration of 25 ug/l after 50 seconds
You should calculate 25 mug/l*total volume/50 seconds
Right?
Assuming that the injected thing has no volume
yes
Ok so that's how you can calculate the coefficient on the Heaviside function
the thing is I don't really have volume
I only have discharge on the mixing I guess I could find it from there
ok composite simpson for integral and stuff like splines for interpolation seem to be pretty useful
but when ppl use newton method do they just spam points
because basically for real life situation u have no guarantee of convergence
root finding
Ah
There are many modern root finding algorithms
Newton's root finding algorithm is not used in practice
But it's a useful starting point
in question b, i don't understand how to get started
i'm just beginning to do these types of problems
What is norm{Ftilde-F}?
if it's the induced 2-norm on the matrix, it should be the largest singular value of \tilde{F} - F
is it not? since F and \tilde{F} are both of the form I - rank-1-matrix, if you subtract them, you get the difference of two rank-1 matrices
that is, at most, rank 2
so there are only 1 or 2 singular values to worry about, both functions of the outer product of a vector
that second singular value that shows up is precisely this perturbation on A they mention
i'll have to leave it at that hand-wavy level, but my impression is that that would be a plausible way to go about it
I'm so confused
i've learnt about stability a bit and yes i know linear algebra but i haven't studied about stability of operations involving matrices because that hasn't been taught yet
i'm referring to trefethen and bau, but is there any better/equivalent source to study it?
I've heard good things about Trefethen but if you don't like it you can also check out Demmel's Linear Algebra, published by SIAM
trefethen is a really good book, but i've read the suggested parts and still can't solve it hence :/
Well checking out Demmel won't hurt
yes, i will check it out, thank you!
How would I incorporate maximal grad descent into mathematica
i managed to calculate the first iterate but its lookin like im gonna need to keep iterating to get g(0,0)=0
What makes gradient descent maximal?
Has an implementation
maximal as in we get to pick t the distance we move each iteration
Ah ok
The first answer in the linked post discusses this with variable step sizes
Yeah i get that
i just dont wanna take something I dont understand how to use, ya feel
I mean, can you figure out the code?
Reading mathematica code makes me sad, probably because I never read it

Looks like Taylor's theorem for an explicit form of the remainder of a Taylor series
wait so can you elaborate, all I can think of is taylor expanding f(x) = L_n(x)+R(x) at some point x in [a,b], and somehow showing R(x) is that junk
also i will check out ur talk XD
Yeah something like that

I was having a hard time getting my queries to run on a dataset at work, I cranked up my cluster size to preprocess my data into something nicer, now things are running faster. Feelsgoodman
Out of curiosity, @wide spear , how free are you to use compute resources in a university (I guess it depends on the research group you are in or something)?
So my uni has a few supercomputers
But you need to request an allocation at the beginning of the year
Once you have an allocation you can do whatever you want with it
Research groups usually get big allocations
Play video games 
mine bitcoin
Also some research groups have their own clusters
Ah, faculty get 300k core-hours/year for free without needing to request anything
1 core-hour is you get to use one compute core for one hour
And how many cores does the supercomputer at your uni have?
"As of April 2020, the system consists of 600 compute nodes in various configurations to support a wide diversity of research applications, with a total of over 15,300 cores and a peak performance of 540 teraFLOPS (CPU) and 1 petaFLOPS (GPU), and offers approximately 3.0 Petabytes of high-speed parallel storage."
what if a faculty member used their core-hours for mining bitcoin
They would probably not get their allocation renewed
this is why tenure is important
just say you're doing research on crypto
There are faculty who do crypto research
They have far more important things to do than mine bitcoin
what if your research is how to optimally mine bitcoin
Closed problem
😢
@brave crypt can you provide some more details about the problem
The problem I posted in #advanced-analysis ?
Yeah
For example, how large is a coffee ground?
How nicely mixed?
How much force goes into a shake?
What is the shape of the container?
Here is a pic of the grounds, normal on the left and decaf on the right. So something like on the order of 1mm.
I think this problem is about mixing, let's say I want mu(B cap T^k A) to be within mu(B)mu(A) epsilon, additively, or maybe 1+epsilon multiplicatively, for say epsilon about 0.05, uniformly over all B.
The way i shake it is to do it is similar to flipping an egg in a frying pan, although sort of different, not sure a good way to describe it.
The coffee filter is in this shape https://www.bedbathandbeyond.com/store/product/cuisinart-gold-tone-coffee-filter/1012198515
EDIT: er, nvm, uniformly over all B makes no sense
Er, the image got flipped, so left is right and right is left, not that it really matters
Ok
My initial idea is to treat this as a sort of Brownian motion
The grounds are of negligible size essentially compared to the container
Then this just boils down to solving the heat equation for your domain, and seeing how long it takes to get to your epsilon
Maybe another thing to add is that I pour the normal grounds, then the decaf grounds (could be opposite, doesn't matter), so one is on top of the other
Initial condition is 1 below a certain height and 0 above
Then you see how long it takes to approach 0.5 everywhere
Reflecting boundary conditions seem appropriate
Hm interesting, yeah I guess this could work
So my professor was showing that the error in Euler's method can actually be expressed as a IVP as well. I was wondering: what is the error of doing Euler's method on the error of Euler's method and so on and so on?
Well, you can write down the IVP and calculate this "second order" error right?
True. I was trying to take the lazy way out and see if someone had an immediate answer. I'll try it and get back

Any resources summarizing important results regarding taylor series particularly wrt approximation?
All of them
So I guess then wikipedia is the way to go
Not really but the joke is that Taylor series are used everywhere
so the IVP of the error term in eulers method is given by $$\frac{dE}{dt} = E - \frac{1}{2}e^{nh}$$ where $E(0) = 0$, $h$ is the step size, and $n$ is the number of steps.
Trichloromethane
So shouldn't the lipshitz constant just be 1?
Sure
And our global error $$\abs{e_n} \leq \frac{e^{\lambda nh} - 1}{2\lambda}Mh$$ where $M = \max{E''}$
Trichloromethane
so we have it that $\abs{e_n} \leq \frac{e^{nh} - 1}{2}h$
Trichloromethane
not sure where to go from here
What did you want to do
I mean I know I can analytically solve the IVP error of eulers method
but I'm trying to find the IVP of the error using eulers method of the error of eulers method
Forget about it being the error of something else
Consider it as a pde in its own right
yeah that's what im doing
Anybody home? I'm going to repost what I had in computing software here...
I have 3D data that is very sparse-mostly NANs on the axis I want to interpolate-and I need to interpolate that into a 3D surface. The NAN data is exclusively one-dimensional: so I'm only looking for stuff on the z-axis. What would be a good method that I could use that is relatively basic and straightforward to implement? I'd be happy to improve later if I can. Currently, I'm using a very dumbed down averages method, but I can tell that's not going to do the trick? I've been doing my own research, but I'm kind of getting bogged down in the details, and I'm a novice that can't figure out what would strike a reasonable compromise between accuracy and ease of implementation.
I'm trying to avoid bringing a whole new library into it, just something I can code up quick and dirty. (C++).
OK, so I have a function f(x, y, z), and I need a nice, smooth surface rather than a scatter plot. And the data is quite sparse, though only the z-axis-the one I want to interpolate over-has NAN data.
So, doing my research: would a cubic spline be a good place to start? I'm completely new to this, so forgive any stupid questions on my part.
By NAN data you mean that those data points don't exist right?
Have a look at bicubic interpolation
Cubic splines are in 1d
Bicubic is the natural generalization
But I only want to interpolate over one axis. So cubic would be the way to go, right?
Anyway, thanks for confirming that, I know it's pretty simple question.
@wide spear Will it be able to handle sparse data, or is there something better for that?
I mean in a sense, all interpolation is sparse in a sense right
You're trying to reconstruct a function with only a few data points
Well, it's not just a function, but a surface, but yes

lol
@wide spear Did I say soemthing really stupid
No
Sorry
Anticipation wrote something and then deleted it
So the stare was at Anticipation
is it just me or does demmel's nla book cover look super creepy? https://images-na.ssl-images-amazon.com/images/I/515PnB4bNzL._SX332_BO1,204,203,200_.jpg
Lmfao
Yeah
The old jpeg standard performs a low rank QR decomposition in the discrete cosine basis, and the new jpeg uses a wavelet transform which is a similar idea
could also be low rank approx through svd or something
SVD is too expensive to compute
And right now remains mostly of theoretical interest for most NLA
yeah but i've seen it used in teaching lin alg a lot
i don't disagree that it's expensive
There have been some faster algorithms recently but they have poor error analysis
I took Demmel's class, this was about low rank QR decomposition
ah okay, that settles it then 🙂
I had a question about perturbation analysis: why do we do $(A+\delta A)\hat x = b + \delta b$ instead of just $A \hat x = b+\delta b$ (I think we do the latter too but why is it not sufficient/why do we also do the former?)
8da
We just keep track of each place error is introduced right
Error is introduced in storing both A and b
Hm, I guess that makes sense. But also if hat x is a computed solution, then I think this would have a much larger error than the error in storing A (storing A would be an error of machine epsilon or whatever right?)
At least in A \hat x = b + \delta b, I imagined the delta b to be mostly about error introduced from hat x not being equal to x
Machine epsilon varies quite a bit
In some modern ML applications, machine epsilon is O(10^-4) or something
But really you have $(A+\delta A)(x+\delta x)=b+\delta b)$ so $\delta x=A^{-1}(-\delta A\hat{x}+\delta b)$ so you can compute $\norm{\delta x}\leq\norm{A^{-1}}(\norm{\delta A}\norm{\hat{x}}+\norm{\delta b})$
Angetenar
And then this leads into condition numbers and stuff
I see (the storing A and b part makes sense to me, I was imagining A and b to be already in floating point, but I see this is not an assumption we are making)

Reposting from the DS discord: In case anyone here is looking to upgrade GPUs and they just need OpenCL, the 6700XT is not better than the 5700XT. AMD's stack still not worth an update.

btw angetenar what do u recommend best way to learn more NLA
i need to prep for future course
and to start applying stuff
as in a good text or something
Demmel’s Linear Algebra is good
ah ive decided to use matrix computation golub

hi guys. I was wondering, (I'm using matlab)
so, I decompose matrix A to USV using svd, then when I look at the Singular values, the largest is 10^26, the smallest is around 5, -> "cond(A)" would be 10^26/5
this is the problem. how can I solve a least square problem (Ax_pinv = b) when I have such A matrix to begin with. Because when I use pinv(A)*b, i get a very wrong result. with norm(A x_pinv - b)/norm(b) = close to 1
and strangely enough, when using QR decomposition, and backward triangular
norm(Ax_qr -b)/norm(b) would be 0.09, the result is reasonable.
does anyone have any idea what is the explanation, that qr can perform well but svd (which I though it would be better numerically) won't give me good relative error?
thanks!
Yikes that condition number is very big
yes 😉
Are you sure that A is invertible?
Ummm, the problem with SVD is that it performs a lot of computation and has poor error analysis
unfortunately I don't know that. but rank is 254 and the column is 529
The SVD is too op because it solves a lot of problems, but because of the no free lunch theorem, it has drawbacks in other places
is the matrix supposed to be invertible?
yes it should be
If you want to solve a least squares problem, then you should take a look at GMRES
10^26 is greater than 1/machine epsilon
So a singular value of 10^26 is worthless on computers
you could do a tikhonov regularization to get a close solution
And I would think this means that it is non-invertible
Personally I would use GMRES for a least squares problem
iterative approaches are always a good idea, agreed
alright i'll take a look at GMRES. but the question remains the same. how could QR come out with a good result. (although when I solve the x, i'd get "with warning: Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 2.026990e-24."
if you want a one-shot deal, a low rank approx with pseudo inverse or a tikhonov reg. would help
QR does not require invertibility
And there are methods to make QR much better behaved numerically
Householder transformations and Givens rotations
to be fair, the SVD is done with givens rotations. the problem is that you try to invert it after, and that division by the singular values will mess you up
actually I'm looking for a way to compute the least square (so finding x) the fastest and better relative error. And I don't have enough reasoning why the QR would give me a good result, but using svd is not 😅
GMRES for least squares
ok i'll take a look at gmres thanks guys!
aight
shoot, i just realised, i haven't told you that my matrix is not square. I just read wikipedia, it's assumed that in order to use gmres, matrix A should be square and invertible. However, my matrix A wouldn't be square and the system would be overdetermined. So I might stick to QR.
or is it possible to give preconditioning. So Matrix B = precond*A) then do gmres
to solve x, sooo
instead of
Ax = b,
it would be
precond * A *x = precond * b
Have a look at low-rank QR
GMRES is certainly faster than QR
For certain classes of matrices
well, I'm writing my bachelor's thesis, and I'm evaluating performance of several least square solvers for my project. including svd aswell. but when I tried svd, it performed not as I expected
alrite
thanks
Yes SVD is rarely used in NLA


send halp
idk if this is dumb but i assumed that p^k=r^k+beta_k-1p^k
but i just can't get to the answer
Well what do you get
i mean, (Ap_k = Ar_k + \beta_{k-1} Ap_{k-1})
homeomorfismo
but that whats missing in the second and fourth term
ohh crap so i wrote it down wrong
you're a legend my guy @orchid sequoia
was starting at this one for a good hour or two
oof
i should really take things step by step
i know that feel bro
I get that now
maybe i should only expand the left side
when i expand the left side only the term i want pops out
okay i figured it out, was a sneaky one
does anyone know if this condition i wrote is ok
sigma is the relu function componentwise, maps everything negative to 0
lmao mean value thm in Rn i didnt even know it existed
also how would u find conditions for unique fixed point if u dont compute jacobians? ReLU makes it annoying to do analysis
maybe a direct argument?
@fleet sail i think you can show that sigma is Lipzchits for the inf-norm (without using MVT), so just bfpt
$g(x)=x$ means $\sigma(Ax+b)=x$. but we must have $x_i\geq 0$ for each $i$ since otherwise this equality is impossible. ah but fuck, hm
8da
i thought this means we must have Ax+b=x, but that would be bullshit math
Ah so you mean showing $| \sigma(x)-\sigma(y) | \leq | x-y |$ in the inf and 1 norm, and then u have $| \sigma(Ax+b)-\sigma(Ay+b)| \leq |Ax-Ay|$ which is lipshchitz if $|A| < 1$ in infnorm or 1norm
Anticipation
?
Yes
thx
so I showed that this was zero, and now i gotta complete the case where j < k
how would i go about showing this when j < k
do i have to use ineq somewhere
hello familia, anyone here have a good source on methods for fitting ODEs to data?
this can fit in a bunch of channels but ill ask here, hopefully that's chill.
Yeah it's fine here
First of all, by fit, do you mean interpolation exact fitting or least squares type best fitting?
least squares type best fitting
My immediate thought for the second type is to first come up with a form of an ode with unknown coefficients, find the general solution, then perform a fit on that
The ODE I need to fit is too nasty for that I think
Hmmmm
it's a epidemic model with the standard stuff, vital dynamics, vaccination (discontinuous function), some other stuff
How expensive is it for you to propagate your ode on your time domain
not that bad
Ok yeah that won't be exactly solvable
Oh ok
You can turn this into a convex optimization problem
Fix the coefficients
Propagate
what I've done before is just put some constraint on the params based on calculated R or w/e and then sampled randomly from the parameter space
Calculate the error
Take the gradient with respect to the coefficients
Update
Does this make sense?
this is a silly question and not super technical but
looking at 8a, this should be S_2 right?
i do not get the value that they report
actually, none of those evaluated at 1 are equal to the value they got
,w -.0023-.0069-1.0046+3
,w .0399-0.007-1.0047+3
,w -0.0587+.8804-3.667+5.6623
so im curious what im doing wrong, or if this is just a dumb error
what is the value they reported
1.28252
oh did you get 2.03?
hm im not sure lol it seems like ur right
are the S_1's given or did you calculate them
given
ah then yea i think ur right
anyone have any ideas
I just read about Wigderson and Lovász's Abel Prize. Is there a breakdown I can read somewhere?
A breakdown of what?
You can always start by reading the Abel Prize announcement, which discusses some work at a high level
Then, you can see their websites, which have lists of publications
Obviously reading all the publications will not be possible, but they also both have lists of survey articles that they've written which will provide a broader overview
As you read the survey papers, if anything stands out and interests you, then you can find whatever paper that corresponds to and read in further detail
hello
everyone
if the question asks for O notation
with h = 0.01 and f'(1)
can I just leave it as O(0.01)
or do I have to do something special
Huh?
Ok and?
You would just write $f'(x)=\frac{f(1.01)-f(1)}{0.01}+O(h)$
Angetenar
I think
thats...it?
I mean do you know what f is?
yes
No
why not
tbh idk why you can't cuz in a question our prof gives he writes this O(h^2)
but i guess strictly O(0.1^2) would mean O(1) so yea.,
An error that is O(0.1^2) is meaningless
Any constant is O(0.1^2), regardless of how big it is
However, an error that is of order 10^-2 does have meaning
Overall, I think O(h) technically makes sense only if h is still a variable. Although I agree that "error on the order of 10^-2" totally makes sense
Yes the big O notation has to do with how error scales as you change h, error on the order of 10^-2 would be absolute error
I have a question, for the second derivative of three point center difference
how would I go about estimating the error in O notation?
Taylor series
thanks 😔
Ajsjsk its okay you helped a lot
Taylor series was just something a long time ago I didn't quite remember it that well that's why
I appreciate
hey, I'm implementing subgradient descent for the SVM problem. No autodiff, so I have to compute the subgradient of the objective manually.
I don't know how to handle the maximum. Without the max, I think that the subdifferential sets would be: $\partial w = \frac{1}{m} \sum -y_ix_i + 2 \lambda \langle w, w \rangle$ and $\partial b = \frac{1}{m} \sum -y_i$ but this is not the correct solution
Something looks weird about indices, eg partial w should be a (set of) vectors right?
Eg I'm not sure what w^2 means
so partial w doesn't mean the partial derivative in this case. Not sure if it's abuse of notation, but partial w is the subdifferential. This is the set of all subgradients
that's what we have in the lecture, but also wikipedia uses ∂f(x0) . Maybe there's a better notation
lyinch
w^2 was bad notation... Sum of elementwise square. I changed it to the dot product with itself now , but the bot doesn't update
Something like that, although derivative of the regularized term should be just 2 lambda w I think. But subgradjent of max(blah, 0) should be 0 if blah<0, normal derivative of blah if blah>0, and some crap if blah=0 (was there a chain rule for subgradjent?)
Eg subgradjent of max(x, 0) (with respect to x) would just be any number 0 to 1 at x=0
ah yes, you're right about the regularizer
the subgradient has a chain rule
that sounds easy, if I just need to check for max(a,0) whether a < 0 . But why is this correct?
Er, why is what correct?
why is this the "rule"
This is just a single variable calculus thing, you can draw the graph of max(x, 0) and the subderivative is clear. Then if chain rule holds everything should work out
,w Plot[Max[x, 0],{x, -3,3}]
Admittedly I'm not sure what the chain rule for subdifferentials looks like but I'm guessing it works out
I have a rule for conic and affine combinations. In this case it's an affine function
Ah thank you! You know I can read the actual math online but it's stuff like this, advice about how to discover something new in the field, which is the type of advice I sorely miss from actually being in person somewhere. thank you
Ah I see, yeah this is good/nice
could one provide the resources for advection (transport, convection) equation for
unstructured 2d grid?
cant seem to find the proper resources
did the poisson and heat equation, they seemed to work.
trying to code up the transport one, getting weird results =\
diffusion did work
but in transport i either mess up with upwind or sth :\
Poisson and heat are both pretty well behaved
Are there any constraints on what methods you can use?
Can you describe the manner in which upwind is not working well?
i took away the diffusion term from the following chapter
calculated the gf = rho * (u dot norm) FaceArea values for each face
and checking their values
used this scheme (w/o diffu term)
also tried with if statements
Ah ok finite volume methods
righto 😐
What weird results are you getting?
look at the left cells
it also seem to diverge
Have you tried a finer mesh?

yep
Are your boundary conditions implemented correctly?
every iteration i run over the faces set left to 1 others to 0
then recalc nodal values by interpolation
finer is kinda ok, but not sure yet, gonna take ages
how did you know finer mesh would solve (almost) the issue ? xD
Advection is unstable
T_T
There's something called the CFL condition which essentially says that if the ratio of your smallest mesh edge length to the time scale is too large, any numerical scheme will diverge
ye but i used 1e-9 time
and ~1e-1 edges
Yeah that's too big
for finer mesh dt should be even smaller
Oh wait
xD
Maybe your time scale is too small
Ok
The other thing you can do is make the mesh much coarser and calculate the first iteration by hand
Hopefully a coarser mesh will mean that it is easier to compute by hand
this one i could probs
will leave the handcalc for the night cuz that time is kinda unproductive
can show u the code if u wish btw
in like 10 minutes
i remember my cfd and openmpi classes
1 day for writing the code
10 days for debugging
8 cores parallel 3d poisson equation AW

with different topologies
assuming it diverged
left boundary is 1 for the faces
unit vectors seem to point in the right direction. but the values are tiny
still waiting for the cell values to diverge
probably might use the implicit methods <_<
Try using a second order scheme instead of upwind perhaps
Lax-Wendroff or Lax-Friedrichs are both second order
how could I prove 4 ?
Ask in #linear-algebra
ok, figured i asked here since I thought it had to do with my implementation
Hi all. I hope I'm in the correct channel for my question
it's regarding this:
I'm not sure how to read the wN here
the paper it's from states that wN is the Nth primitive complex root of unity
but to my understanding that is a set of at most N roots of unity, right?
if X*r is a set of complex numbers
how do I multiply them by wN^-k(cmin,r)L?
so basically: assuming N, k, (cmin,r) and L are all known, how do I get the real and imaginary parts for wN^-k(cmin,r)L?
You are taking the dot product of two vectors
Elementwise product, then sum together?
X_r[k] is a scalar right
it's an array of complex numbers
X_r is an array of complex numbers or X_r[k] is an array of complex numbers
oh sorry
X_r is
it's the result of a Fourier transform
so basically a phase and magnitude
Yes so X_r[k] is a scalar
So you compute $X_r[k]=\sum_{i=1}^N(X_r^*[k])i(w_N^{-kc{\min,r}L})_i$
Angetenar
Or you might want a conjugate on one of them
My algebra is rather spotty. Where did that summation come from?
You're taking the complex inner product of two vectors
Okay, I'm coming from a CS background, I fear I might be in over my head here. So forgive me if I ask stupid questions
Can't I get the real and imaginary parts for $(wN^{-kc{\min,r}L})$ and just multiply the two complex numbers $X_r^*[k]$ and $wN^{-kc{\min,r}L}$?
bastos80
Ordered sets of complex numbers
I found a matlab implementation (that I feel isn't 100% correct) that solves it this way: Xr = Xr .* exp(1i2pi*(0:kmax+N/L-1)*(RingBufferIndex-r+1)*L/N);
Ah ok. So it takes a range of 0 : kmax and multiplies each value it with 2 PI and the complex unit, then takes the exponent of that and then multiplies the two arrays
But I'm failing to find the summation in there.. is it implicit?
bastos80
How do I get that into a vector/complex number
in other words, what are the real and imaginary parts of that part
Well do you know that w_N is
The N-th root of unity right
Then you take it to whatever power
it is the Nth primitive complex root of unity
Yes
but from what I read that's multiple compex numbers
Then we can write $w_N=e^{-\frac{2\pi i}{N}}$
Angetenar
aha. that's the missing part of the puzzle I think.
it's from this paper: http://dafx.de/paper-archive/2006/papers/p_247.pdf
bottom of page 2
I tried reading up on primitive complex roots and I think I get it
I just don't get the relation of them to $e^{-\frac{2\pi i}{N}}$
bastos80
$w_N=e^{-\frac{2\pi i}{N}}$
Angetenar
It's the primitive Nth root of unity
so does that mean there's only one primitive Nth root of unity? Or can it be solved more than once
There is only 1
Weird
The material I read stated there are $\phi(n)$ primitive $n^{th}$ roots of unity
There are N Nth roots of unity
wow I butchered that tex
You take w_N and raise them to powers 1 through N
However they are all generated by a single root
bastos80
What is phi?
Euler's totient function
Did I misunderstand?
No ok
Yeah that's a fine definition
Ok so w_N is the vector of primitive N-th roots of unity?
Maybe
Then you take the elementwise powers
Yeah that wasn't completely clear to me either
It just states: wN is the Nth primitive complex root of unity
so, singular
Thanks for the help. I’ll try to implement it tomorrow. I’ll keep you posted.

?
the methods of LW and LF would be an issue cuz the final problem is NS eqn 😐
aww, my gf calculations werre wrong, need to calc gf for each face when running over cells <<
was like this
then added it to calculation of advection term
seems working, waiting forever to finish running
I have another question if that's ok...
This is applying frequency domain windowing on a FFT output
$a_m$ in my case are real constants of a Hamming window
bastos80
but I'm not that familiar with frequency domain windowing... do I just apply the regular $w[n] = a_0 - a_1 \cdot cos(\frac{2\pi n}{N})$ here?
bastos80
where the n is m from the earlier equation?
nvm xD once it hit the edge started to diverge
nice pfp
Can i ask about course of value recursion here? It should be computational maths afaik, but im not sure
Is this course of values recursion for defining number theoretic functions recursively?
Yes, something like that
You should probably ask about this somewhere in #advanced-number-theory or #elementary-number-theory
alright, thanks)
is there anyone with knowlegde of quantum computing, particularly grovers algorithm? i have a couple of questions to discuss
If no one can help you here, you're probably better off asking in the physics or computer science discords
They're linked in #old-network
good idea, thanks
Just a fun little acronym, maybe you can figure it out 🙂

Resizing a matrix generally sounds like a weird thing to do
It's like one of those what will you do for a klondike bar type things, like for an FFT it's way worth it to resize it to a power of 2 instead of computing a DFT
Oh I just read modern FFT algorithms can do non power of 2, but the code is more complicated. So as long as you don't have to write your own you don't need to resize.
Yes modern fft algorithms can handle non power of 2 sized matrices
My whole thesis is above not resizing a multidimensional array
Wait what does bot top mean
Tensor Completion Algorithms in Big Data Analytics - a cool survey
ah nvm, i got resizing and reshaping confused
so im asked to use finite differences method to compute a 6th order pde. to do so, i use a 3 step center approximation. my boundary condition is a value at u(t,0) = u_0, and the fact that its first and second derivative at u(t,0) is 0. so my guess was to just use the same value for the first 3 points, but when i run my code, the values blow up quite quickly because these 3 values are the same, and there is some sort of discontinuity in the data
im struggling to put this in words, but basically i need to know how choose my starting values for a 3 step approximation
Ok so you have x0 which is a boundary and you have x1 and x2 which are close to it
You know that u(t,x0)=u_0 so fine you set x0 to that
yes
Now, the first and second derivative at u(t,0) is 0
Oh also you should be using a 3 point assymetric approximation because you're at the boudnary
for which approximation exactly? for the pde or for u(t,x_1), u(t,x_2)
For the first and second derivatives
sorry im not following
ahh and the derivative i know
And u''(t,0)=(u(t,0)-2u(t,h)+u(t,2h))/h^2
So from this, you get a system of equations
perfect
my mistake was to trying to approximate u(t,x_1) by taylor in u(t,x_0)
but this makes more sense
well thanks, ill see if that works
oh one more, why do i need to use a 3 point assymetric at the boundary?
Well you said you were using a 3 point symmetric approximation for the derivatives right
So 3 point asymmetric
Actually
7 point i guess? x_{i-3}, x_{i-2} ,/dots, x_{i+3}
Yikes 7 points
its a 6th order derivative...
so still 3 point?
i have to do some analysis on the stability later, but i figured id start with the implementation
but then i have 3 unknowns and only 2 equations, not?
because only u''(t,0) is known
Didn't you say the first and second derivatives at the boundary were 0
Anyways
You have a bunch more equations for everything else right
The interior terms
So it's a big system of equations
Not just at the boundaries
DvaNapasa
area is a polygon, cant seem to apply Gauss-Ostrogradski thm(
$\int_{S}\nabla s \cdot \hat n dS$
DvaNapasa
$\int_{A}\nabla s \cdot \hat n dA$
DvaNapasa
nvm forget abt the question, i was drunk and stypid
can anyone answer me a follow up question to this problem?
so when i choose a 4 point approximation to get u(t,x_1) and u(t,x_2), they end up even further away from u(t,x_3), which leads to even bigger problems
somehow u(t,x_1) and u(t,x_2) need to be inbetween u(t,x_0) and u(t,x_3)
Are you doing interpolation?
consider taylor series expansion around the point of your interest @grave sand
`multuply each equation by some coefficient
and find the coeffs
Chapter12.pdf
page 3
no, is that something i could do?
yea let me give you more details about the boundary
so the initial conditions are u(0,x) = e^{-x^2/16}
so it starts at 1 and goes to 0 as x increases
u(t,0) = 1
and the derivatives are 0 are mentioned
How many derivatives are 0
u', and u''
so the first timestep is fine, because U(0,x) is 'smooth' (steady decrease)
Don't you have a 6th order derivative?
let me send you a screen shot
question B)
the general PDE has a 6th derivative
but the boundary conditions are that u'(t,0) and u''(t,0) are 0
so calculating the first timestep is fine, because u(0,x_i) is 'smooth' as in nicely decreasing and regular
but for u(t_1,x_1) and u(t_1,x_2) we discussed which values to choose
if i do a 2 point approximation for u'(t_1,x_0), u''(t_1,x_0), i get that u(t_1,x_1) =u(t_1,x_2)=1
so then my data looks like u(t_1,x) =[1,1,1,0.9,0.88,0,86,...]
do you follow until now?
I think you need a 3 point approximation for u''
yes, sorry 3 point
but that still gives me that its all the same value (which makes sense as the derivative is 0)
Ok sure
now when i run my 7 point approximation in the next timestep, i use the first 7 datapoints
but theres a jump from 1 to 0.9
so my values just explode
What do you mean by a jump
so you see 0.9 is 'close' to 0.88 and 0.86
Ah I see
maybe i can show you some of the actual points
You might want to use more points at the endpoints then
Create custom finite difference equations for sampled data of unlimited size and spacing and get code you can copy and paste directly into your program.
Use 7 points perhaps
i tried that, but then x_1 and x_2 were above 1
so the gap got even bigger
well im not sure if i did this correct
thats a nice tool
would you be able to go in a voice channel quickly? (its also ok if you dont have time, i have teachers for this very reason)
I am unable to
okay
okay, so what i did is i used the values for u_3 i got from my normal approximation (with the data from the perivous time step)
is that correct?
Sure
but then the values for u1 and u2 were slighly above 1
yes, quickly
An implicit scheme instead of an explicit one perhaps
for space or time?
But it wants a FTFD
So they probably don't want you to do this
Have you considered shrinking dx and dt
That usually helps
yea i thought so too, but i think my matlab does some weird stuff
Well matlab sucks
maybe ill try with python
i think it wasnt accurate anymore at some point
anyways, thanks for the help

Anticipation
if f is defined to be $f(X) = |Y-AX|_2^2$, (least square stuff)
Are X and Y vectors?
yea
Anticipation
but u know whic line?
Yes
ok now that makes sense
wait for R^d how do you use hessian to determine if its min or saddle or max
f:R^d->R
the hessian must be positive or negative (semi) definite
oh ok, and also for example for this one
that's a quadratic form, should be positive definite
lemme get my tablet and write out some steps
i saw you did these things working with the scalars and using sums
i'll do it directly over the matrices and vectors, of you don't mind
yea sure i think i can understand
real
k
you can double check if i did something stupid, but that should be ok
could divide by 2 after finding the gradient, but that shouldn't hurt
this means least squares problems are convex
the least squares solution matches the pseudo inverse
thanks i wil have a lookd
tbh the notation for these things is not agreed upon
but i have seen that used fairly often
im tryingt o justify why it appears u can just do 1D calculus with this notation
it's consistent with the notion that
the reason it appears that way is that the individual entries of the vector x appear by themselves in the sums
so when you take partial derivatives w.r.t. one entry, all the other entries become 0
alternatively, take the gradient you already have and notice that the hessian is the jacobian of the gradient
if you wanna stick to scalars
i just found $\grad x^TA^Ty = (A^Ty)^T$ lol what
Anticipation
that's kinda weird, gradient w.r.t. x, sure, but not x^T which is what you want
You probably already know but wikipedia has a nice list of formulas https://en.m.wikipedia.org/wiki/Matrix_calculus#Identities
In mathematics, matrix calculus is a specialized notation for doing multivariable calculus, especially over spaces of matrices. It collects the various partial derivatives of a single function with respect to many variables, and/or of a multivariate function with respect to a single variable, into vectors and matrices that can be treated as sin...
oh was just being dumb thinking of gradient in rows
also thx i never did much matrix calc before
as pointed out by 8da, wikipedia has a lot of nice stuff
i used flavor 3. in there
which is really 1. in a trench coat
ok i understand this is lit
thanks, also want to make sure things like $\grad x^TAx = 2Ax$ is just applying identities that you are used to right? as in you proved it once (by element-wise) and never have to do it again.
Anticipation
yes
you can always reach the same result by doing it with scalars
and if at any point you don't remember some matrix calculus identity, even with multilinear stuff, you can always express it as a sum and do it like that
yea ic thx
Hi there! Anyone here with DFT/FFT experience? I'm implementing a phase vocoder and I've run into a bit of a snag
This is the relevant part of the paper
I get the $Z_u$ part
bastos80
But how would one cumulate the phase rotations? Multiplying $Z_u$ with the next $\Delta \omega R$ seems odd
bastos80
heey guys, new here. i want to work on some implementations for the newton method in R^n -> R^n case. and i am looking for a good test function that needs some more steps to converge
does anyone of a good test example or a place to find one?
Newton's method for finding roots?
yees
Ok
f(x)=x+abs(x)^(4/3) should converge slowly
Newton's method does not display quadratic convergence for this
You can modify the exponent to get a wide range of convergence speeds
can i extend that nicely to a R^n -> R^n case
i am working on a dampened newton method and want to test some stuff for r^2 -> r^2 case first before trying to proof anything
Any cool numerical subjects to look out for?
All of them
But what if I already took a grad class on numerical analysis and numerical linear algebra. I feel like the only cool thing in numerical is krylov subspaces, can't think of anything else
Woah so I've seen stuff about generalizing ft but that's a numerical topic??
This is really cool 😎.
Now this is the sort if stuff I wanna learn about lol
It sounds like your interested in computational algebra and not classical numerical analysis
Maybe I dont understand the distinction enough. But I don't think it's specific to computational algebra. I just want a cool applied topic tbh
Based on what you have said is interesting
Yeah I see what you're saying
I think of approximation theory, discretization methods for pdes, and system solvers when I think of numerical
I probably don't have a firm understanding of what exactly is classical numerical analysis
I feel like you have a Santa bag of cool stuff dude wth
It sounds like you just need to see modern numerical analysis research
Agreed 🙃
Yeah, the things you shared are good starting points for some Google searches.
Posted this in category theory cause I was curious above whether the diagram on the middle bottom right is related to category theory (probably isn't). It's cool nontheless

I deleted the other post sorry for spamming lol. BUT THIS IS APPLIED MATH 🐮
Is it just me, or does polar of a set sounds like a really weird thing? Eg, it is not even translation invariant. And I fail to see that C convex implies double polar of C is itself. First polar can be empty except for origin if C contains a ball around the origin, then double polar is the whole ambient space R^n
So usually it's called the polar set
And it's something in functional analysis
There's something called the bipolar theorem
Which says that the bipolar of a set is the weak closure of the convex balanced hull of the set
The graphic is not correct as written
In particular, the images seem to be in reference to dual polyhedra
Hm
The "balanced" part addresses translation invariance
And the bipolar of a convex set is not necessarily itself
Also the definition given is not correct
If $X$ is a topological vector space with a continuous dual $X'$ and $<x,x'>=x'(x)$ then $A^{\circ}=\left{x'\in X':\sup_{a\in A}\abs{<a,x'>}\leq1\right}$
237387148
This is the correct definition of a polar set
I looked it up in wikipedia, it looks like the definition in the graphic is called a polar cone
Yeah
Anyways
The graphic is a hot mess
Oh also
The images display dual polyhedra
Which are neither polar cones nor polar sets
No memes here
Understood lol
I think ange was joking
This graphic presents several important concepts in convex/functional analysis, mis-names them, shows examples of other things, and then tries to present some deep connections between them

any FVM people here?
code-debugging issues 😐
@wide spear oof
Dammit Gabriel peyre for sharing this and me for not validating

Tf u up already?
What do you mean
@wide spear voice?)
No
i cry
Diverging results
Ok so you have a finite volume method
What pde are you applying it to
Have you tried randomly changing signs/making the mesh size smaller
yes did
same result
when i add the divergence of the velocity field to the rhs the poisson equation goes to infinity
mathematically RHS
What is the left hand side?
tangential flux in first loop and divergence of v inthe second
lhs is grad dot (grad pressure)
im using gauss seidel
i have the perfectly working code for the poisson equation with zero rhs i.e. soource term
@wide spear i mean probs the whole method is not applicable to the fvm
i did it in finite difference
therre also might be some checkerboard pressure oscillations that lead to this issue but idk
I'm stupid @wide spear
@warm otter
Did not apply Neumann bdry to the walls dp/dn=FluxWall=0
Getting kinda ok result for now
Still diverging
But the pressure distribution is uniform
Except for the initial sudden peak
Will send screens in the evening
Left pc to calc
Will be done in 4-5 hrs
I'm solving a symbolic regression problem using genetic programming. I know that a target formula should be invariant under a certain transformation on its variables. How can I use this information to improve the quality or speed of the algorithm?
For example, assume I'm trying to rediscover the Heron's formula from school geometry (area $S$ of a triangle whose sides have lengths $a, b, c$ is given by $$S = \sqrt{p (p-a) (p-b) (p-c)}$$ where $p = \frac{a+b+c}{2}$). I know in advance that changing the order of the sides $a, b, c$ won't change the area, so if I write $S = f(a, b, c)$, $f$ has to be a symmetric function. If there were no square root (which isn't a problem I think), I could use the fact that every symmetric polynomial can be expressed as a polynomial in elementary symmetric polynomials. In this example it suggests new variables $s_1 = a + b + c, s_2 = a b + b c + c a, s_3 = a b c$. Now I can try to construct a formula using these new variables instead, and hopefully get a better result, because now I always construct formulas that describe symmetric functions, so at the very least I reduce the search space.
Another example of invariant that could be used is homogeneity. In the example above, if I write $F(a, b, c, S) = 0$, I can say in advance that $F$ should be invariant under transformation $\varphi: (a, b, c, S) \rightarrow (k a, k b, k c, k^2 S)$. Using homogenization and dehomogenization procedures, I can eliminate variable $c$ and then work with formulas as usual, adding $c$ back into the final result. The benefit is one less variable to search over.
uoSqoɔɐſ
Any ideas on a more general approach?
For example, is there a general way to decompose formulas into ''symmetric'' and ''residual'' parts such that symmetric part is invariant under a transformation, and residual part is minimal in some sense? We could remove residual part to restrict ourselves to ''good'' formulas. Or we could try to measure the residual part and add this value as an error term into fitness function, thus forcing the algorithm to prefer ''better'' formulas. For example, if we want homogeneous polynomials of degree 2 over $x$ and $y$, a polynomial $x^2 + 3 x y + 6 x + 2$ can be decomposed as a sum of $x^2 + 3 x y$ and $6 x + 2$.
uoSqoɔɐſ
hmm what sort of formulas are you wanting to find in general outside of heron's formula?
the more information you give it about symmetry and so on is sort of cheating isn't it?
Are you familiar with stuff like computational algebraic geometry and grobner basis? Admittedly I'm not very familiar myself but it sounds related
School geometry formulas in general sense, like when some values on a picture are known and we want to find some unknown one. For example, to derive a length of a cevian in a triangle with known sides which splits its side in a given ratio.
well, I don't think it's cheating if we can see the symmetry beforehand
sure, but where do you decide to draw the line for what you can see beforehand?
if you look long enough you can just derive the formula yourself and side step the whole process
Yeah, I'm kinda familiar with groebner bases. That was another thing to think about :) I just wanted to use genetic programming because trigonometry formulas are usually rather simple in a sense that you usually use only arithmetic operations, square/cubic roots and rarely get a degree higher than 2-4.
@nova cedar let's say that the more I see, the better for me. Indeed, there are some results like with determinant formula when the symmetries found are enough to make the fitting formula unique. But there are no general approach to do that afaik, and I want a computational solution to think less anyway.
oof

