text:
Followers 0

AngelScript MingW-64

5 posts in this topic

I must be missing something or is it just that AngelScript is not compatible with MingW-64.

I am using CodeBlocks with TDM-GCC MingW-64 on Windows 7 64bit

This is the same on both newest dev and release of AngelScript.

angelscript_2.25.2 and angelscript-trunk

The disassembly is from trunk if it matters.

I get SegFault on context Execute()

I am testing using the Console sample but tried tutorial sample with segfault also.

scripthelper.cpp
int ExecuteString(asIScriptEngine *engine, const char *code, asIScriptModule *mod, asIScriptContext *ctx)
Line 154
r = execCtx->Execute();

Feature Test passed all except

Failed on line 178 in test_addon_debugger.cpp

Creating Static Library using the the CodeBlocks project however I changed the defines because 64bit compilation fails with i386 option with Error: invalid instruction suffix for push' ...etc

Currently Using these defines but I have tried many different combinations with no change. Without AS_X64_GCC the featuretest SegFaults after the first 2 lines.

ANGELSCRIPT_EXPORT
WIN32
AS_X64_GCC

Disassembly

0x004049BC    callq  *%rax
0x004049BE    mov    0x74(%rbp),%edx
0x004049C1    mov    %edx,0x3c(%rbp)
0x004049C4    jmp    0x404a25 <ExecuteString(asIScriptEngine*, char const*, asIScriptModule*, asIScriptContext*)+733>
0x004049C6    mov    0x68(%rbp),%rax              <---------
0x004049CA    mov    (%rax),%rax
0x004049CD    add    $0x28,%rax 0x004049D1 mov (%rax),%rax 0x004049D4 mov 0x68(%rbp),%rdx 0x004049D8 movl$0x2,-0x28(%rbp)
`
Edited by Neuntoter
0

Share on other sites

As an update I have tried it with everything from no additional defines to manually adding defines to make sure it should be compiled with MINGW-64 options.

Still doesn't work. At this point I have to believe that the issue is an incompatibility between the compiler and and angelscript and not an issue of defines.

Also though I never mentioned it, it works properly built as 32bit.

Edited by Neuntoter
0

Share on other sites

Which version of MinGW are you using?

With version 4.7 they changed the native calling conventions considerably. I've already made the 32bit version working for both the new and old calling convention, but the 64bit version probably needs adjustment. Actually, I'm not too sure the 64bit ever worked, as I never tested it myself due to lack of environment.

I do have a I'll investigate this as soon as possible.

0

Share on other sites

This is 4.7.1

I was hoping it was simply not compatible and I wasn't missing something obvious.

I would be interested to get it working.

I am pretty sure it worked in 64bit on mingw in the past.

0

Share on other sites

MinGW 4.7 probably changed the 64bit version to be more closely matching to MSVC ABI, at least this was what they did with the 32bit version. If MinGW 64bit worked with as_callfunc_x64_mingw.cpp before, it probably needs to be updated to be more like as_callfunc_x64_msvc.cpp and as_callfunc_x64_msvc_asm.asm now.

I'm quite busy now. I have a lot to catch up after my vacation, so if you could do this investigation on your own for now it would be good. Otherwise I'll probably have to keep my investigation on this on hold for a couple of weeks.

0

Share on other sites

I've fixed the problems with MinGW64 4.7 in revision 1592.

Regards,

Andreas

0

Create an account

Register a new account

format: plain


text:
Recognitions:
Gold Member

## Best Songs Ever

 Quote by Ivan Seeking In honor of the new Prophet Haha, heehee, hoho...
Gotta love that Alex =D.
 Moustique Moustique ah tu es un salaud... http://www.youtube.com/watch?v=Nns7xv3BZq0
 Mentor I know I've posted this before, but I just heard Dave Brubeck died Here he is on piano in 1959: http://www.youtube.com/watch?v=0HUEiUOCLeI

Recognitions:
Gold Member
 Quote by lisab I know I've posted this before, but I just heard Dave Brubeck died Here he is on piano in 1959: http://www.youtube.com/watch?v=0HUEiUOCLeI
Maybe we should all
 Recognitions: Gold Member I saw Brubeck with two sons, and Jerry Mulligan on sax, back in college. The ticket cost me $1.50. Thank the land-grant progenitors for student activity funds! Recognitions: Gold Member Science Advisor  Quote by turbo I saw Brubeck with two sons, and Jerry Mulligan on sax, back in college. The ticket cost me$1.50. Thank the land-grant progenitors for student activity funds!
I use to watch these guys for about the same cost. And later did do some partying with Robbie; as he was a good friend of the piano player in our little band.

 "Three to Get Ready" is the first tune on the "Time Out" album. It alternates between 3/4 and 4/4 time and 'sort of' prepares you for the more unconventional time signatures to follow like 9/8 and 5/4. I really like Brubeck's restrained piano solo here. He does move into some heavy block chords late in the solo, but not too excessively. It all works very nicely with Paul Desmond's great lyrical alto sax. Paul died prematurely in 1977 of lung cancer. Here's one of my favorite "old" songs. I've never heard Brubeck do this haunting melody before.
 I stumbled across this version of Brubeck/Desmond's "Take Five" by Brittni Paiva (who I've never heard of before). I thought 'some amateur's video', but I was curious so I listened. Some amateur! She looks to be 15 but she is actually 23 now. No Wiki article yet, but she deserves one. She plays the ukulele (another reason not to listen,....until you listen). I think this is worth a double post. http://worldmusiccentral.org/2010/08/23/ukulele-fire/

 Quote by SW VandeCarr
She swings!

The best jazz musicians these days seem to be Japanese women. Here's my fave Take Five.

 Quote by ImaLooser She swings! The best jazz musicians these days seem to be Japanese women. Here's my fave Take Five.
Well, there's no questioning her technical virtuosity and, for the most part, I enjoyed her interpretation. But maybe you could explain to me why talented jazz musicians, mostly pianists, like to throw in such harsh dissonant chords and break the rhythmic flow. Is it to shock, or maybe wake up the audience? Brubeck used do that too. Only Thelonious Monk could do that and make it work, IMHO.

 Quote by SW VandeCarr Well, there's no questioning her technical virtuosity and, for the most part, I enjoyed her interpretation. But maybe you could explain to me why talented jazz musicians, mostly pianists, like to throw in such harsh dissonant chords and break the rhythmic flow. Is it to shock, or maybe wake up the audience? Brubeck used do that too. Only Thelonious Monk could do that and make it work, IMHO.
I think it sounds great. But I'm a jazz musician who loves novelty, so I'm in a tiny minority.

 Quote by ImaLooser I think it sounds great. But I'm a jazz musician who loves novelty, so I'm in a tiny minority.
Oh. I see. What do you play? Still, I suppose slamming your fist down on the keyboard every once in a while is novel, but is it music? (At least that what it sounded like to my uneducated ear.)

Recognitions:
Gold Member
 Quote by SW VandeCarr Oh. I see. What do you play? Still, I suppose slamming your fist down on the keyboard every once in a while is novel, but is it music? (At least that what it sounded like to my uneducated ear.)
I was formally educated in music from the 3rd thru 7th grades, at which point I decided for some reason that playing the violin was not cool. So I'm not sure I have a properly educated ear either. But George Harrison's "naughty chords" comes to mind:

 Quote by dratironmusic .... Composers use tension to keep the listener interested. It puts you into the song and makes you want, however subconscious it may be, the song to go a certain way. Harrison's use of rhytmic and harmonic tension is what keeps us hooked in every song. It is the reason we listen to it and find joy in it because he was a master at it. He was a master of directing us through each of his songs, taking our emotions and manipulating them with naughty chords and time changes but always taking us back home in the end. As long as this entry has been, I have only begun to scratch the surface of Harrison's masterful songwriting. In future updates I will discuss what production aspects give him his distinct sound as well as analyise his most impressive compositions so that we can all explore, together, the inner workings of brilliant music. ...
If you think this quote is long, the original article is 20 times longer, and I think you'd need a PhD in music to comprehend it all.

 Without getting into the details of how to construct each chord, I'll show you examples. A Cmajor chord is built on the note C-E-G. The distance from C to E is a major third (hence a major chord). A Cminor chord is built on the notes C-Eb(b=flat)-G. The distance from C to Eb is a minor third.
Without getting into the details? It's like being in math chat.

 Quote by George People always say I'm the Beatle who changed the most, but really that's what I see life is about. You have to change.

 Quote by SW VandeCarr Oh. I see. What do you play? Still, I suppose slamming your fist down on the keyboard every once in a while is novel, but is it music? (At least that what it sounded like to my uneducated ear.)
I play electric bass and a little bit of piano.

Playing music changes your brain (really) so musicians hear music differently than ordinary people, and highly trained musicians hear differently from casual ones. It's like learning a language, so yeah, we have got our own secret world. Very beautiful, but lonely.

Music is strictly for fun, so is what I hear "better" than what you hear? No, just different. You might even say that all that training is a waste of time. It has no practical use, that's for sure.

As to the "It's all cultural conditioning" theory, that's a load. You'd be amazed at how much agreement there is amongst musicians as to what is good and what is bad.

 Quote by OmCheeto I was formally educated in music from the 3rd thru 7th grades, at which point I decided for some reason that playing the violin was not cool. So I'm not sure I have a properly educated ear either. But George Harrison's "naughty chords" comes to mind: If you think this quote is long, the original article is 20 times longer, and I think you'd need a PhD in music to comprehend it all. Without getting into the details? It's like being in math chat.
I've skimmed that article and think it is BS. (The references to "his lose timing" and "mark of genious" don't help.) Diminished and augmented chords were common in pop music from 1920 to 1960. That's what the Beatles grew up with. It used to be completely normal, so anyone can learn that stuff.

"Here Comes the Sun ... Harrison shifts from 4/4 to 3/8 to 5/8 to 2/4. It's craziness unmatched anywhere else in rock music but it's brilliant." This is hogwash. It's especially silly because it applies to some John Lennon or Led Zeppelin but not George. Listen to "Good Morning" or "Black Dog" or "The Ocean." This guy is full of it.

Basic harmony is pretty simple, but if you don't know it it might as well be algebraic topology. There is harmonic theory but I find it of limited use. The ear is all that really matters. Beatles tunes are very pleasing to the ears, but sometimes contradict theory.

Pop music for some reason has devolved to being very, very simple in every way. So yeah, ordinary pop tunes from 1940 are PhD material in comparison.

Recognitions:
Gold Member
 Quote by ImaLooser I've skimmed that article and think it is BS. (The references to "his lose timing" and "mark of genious" don't help.) Diminished and augmented chords were common in pop music from 1920 to 1960. That's what the Beatles grew up with. It used to be completely normal, so anyone can learn that stuff. "Here Comes the Sun ... Harrison shifts from 4/4 to 3/8 to 5/8 to 2/4. It's craziness unmatched anywhere else in rock music but it's brilliant." This is hogwash. It's especially silly because it applies to some John Lennon or Led Zeppelin but not George. Listen to "Good Morning" or "Black Dog" or "The Ocean." This guy is full of it. Basic harmony is pretty simple, but if you don't know it it might as well be algebraic topology. There is harmonic theory but I find it of limited use. The ear is all that really matters. Beatles tunes are very pleasing to the ears, but sometimes contradict theory. Pop music for some reason has devolved to being very, very simple in every way. So yeah, ordinary pop tunes from 1940 are PhD material in comparison.
hmmm...

I disagree with everything except for the fact that current pop music all sounds like "mary had a little lamb" lately.

ps. This is supposed to be kind of like an MTV thread, only with music, unlike MTV....

 Quote by Joni Oh but now old friends are acting strange and they shake their heads, they say I've changed well something's lost but something's gained in living every day

pps. Did I self sensor, or did someone delete my repost of Arildno's Opera piece?
 Quote by arildno I don't know if I've posted this before, but Diana Damrau's performance as The Queen of the Night is just magical: http://www.youtube.com/watch?v=DvuKxL4LOqc

Or is there a music counter? I offered my bartender \$5! if he'd play that the other day. He said; "No Opera!"

.......

kids......

 Tags evo, music, songs


text:
• Home
• E-submission
• Sitemap
J. Ocean Eng. Technol. Search

CLOSE

 J. Ocean Eng. Technol. > Volume 36(2); 2022 > Article
Shin: A Fourier Series Approximation for Deep-water Waves

### Abstract

Dean (1965) proposed the use of the root mean square error (RMSE) in the dynamic free surface boundary condition (DFSBC) and kinematic free-surface boundary condition (KFSBC) as an error evaluation criterion for wave theories. There are well known wave theories with RMSE more than 1%, such as Airy theory, Stokes theory, Dean’s stream function theory, Fenton’s theory, and trochodial theory for deep-water waves. However, none of them can be applied for deep-water breaking waves. The purpose of this study is to provide a closed-form solution for deep-water waves with RMSE less than 1% even for breaking waves. This study is based on a previous study (Shin, 2016), and all flow fields were simplified for deep-water waves. For a closed-form solution, all Fourier series coefficients and all related parameters are presented with Newton’s polynomials, which were determined by curve fitting data (Shin, 2016). For verification, a wave in Miche’s limit was calculated, and, the profiles, velocities, and the accelerations were compared with those of 5th-order Stokes theory. The results give greater velocities and acceleration than 5th-order Stokes theory, and the wavelength depends on the wave height. The results satisfy the Laplace equation, bottom boundary condition (BBC), and KFSBC, while Stokes theory satisfies only the Laplace equation and BBC. RMSE in DFSBC less than 7.25×10−2% was obtained. The series order of the proposed method is three, but the series order of 5th-order Stokes theory is five. Nevertheless, this study provides less RMSE than 5th-order Stokes theory. As a result, the method is suitable for offshore structural design.

### 1. Introduction

The Brazilian multinational petroleum corporation Petrobras and partners are developing the Buzios oil field, which is approximately 210 km offshore of Brazil. The Floating production storage and offloading (FPSO) is spread-moored in a maximum water depth of 2,030 m and has facilities to receive oil from sub-sea wells. It also has production plant facilities to process fluids, stabilize them, and separate produced water and natural gas, which is re-injected into a dedicated reservoir. Processed liquids are metered, stored in the FPSO cargo storage tanks, and offloaded to export tankers. The design life of the FPSO is 30 years.
The relative water depth is defined as kh = ω2h/g, where k = 2π/L is the wave number, ω = 2π/T is the angular frequency, L is the wavelength, T is the wave period, h is water depth, and g is gravity. According to DNV (2010a), it is normally not necessary to investigate wave periods longer than 18 s. Therefore, the relative water depth is greater than 25 for the project. When the relative water depth is greater than 2, deep-water wave theories are applicable (Chakrabarti, 1987; DNV, 2010b; Shin, 2019).
Well-known wave theories include Airy theory, Stokes theory, Dean’s stream function theory, Fenton’s theory, and trochodial (Gerstner) theory for deep-water waves in offshore structure design. Trochodial theory is an exact solution of the Euler equation with vorticity. The first rotational solution was described by Gerstner in 1802 and was independently rediscovered later by Rankine (1863). A mathematical analysis of trochodial theory was performed by Constantin (Henry, 2008). The wavelength is independent of the trochoidal wave’s height, unlike in Stokes’ wave theory and observations. The trajectories of a water particle are closed circles, in contrast with the usual experimental observation of Stokes drift associated with wave motion. Therefore, trochodial theory is of limited use for offshore structure design.
Airy theory, Stokes theory, Dean’s stream function theory, and Fenton’s theory are irrotational wave theories, unlike Trochodial theory. The wavelength is also independent of Airy wave’s height, and Airy theory is applicable for kH ≤1/25 (Chakrabarti, 1987), where H is the wave height. Therefore, Airy theory is unsuitable for describing waves near the Miche limit (DNV, 2010b); i.e., H/Lo = 0.14, where Lo is the wavelength calculated by Airy theory.
The first nonlinear solution was reported by Stokes (1847), who calculated waves in infinite/finite depth. De (1955) and Skjelbreia et al. (1960) obtained the 5th-order solutions for waves in finite depth. Schwartz (1974) and Cokelet (1977) obtained solutions of higher-order expansions. Stokes theory is based on a perturbation method and provides a closed-form solution, but it does not satisfy two boundary conditions on the free surface. The 5th-order theory (De, 1955; Skjelbreia and Hendrickson, 1960) is applicable for all deep waves (Chakrabarti, 1987), but the error of the theory is more than 1% for waves near the Miche limit (DNV, 2010b). Stokes theory gives non-conservative results for offshore structure design.
Based on the use of truncated Fourier expansions for field quantities, Chappelear (1961) and Dean (1965) developed a Fourier approximation method. By choosing expansions to satisfy the Laplace equation and the BBC, the problem is reduced to solving a set of nonlinear equations for each of the Fourier coefficients. Dean’s stream function theory (Dean, 1965) is a purely numerical procedure (DNV, 2010b). It requires order higher than 11 for describing waves near the Miche limit (DNV, 2010b). Nevertheless, its error is more than 1% (DNV, 2010b).
Rienecker and Fenton (1981) adopted the stream function expansion (Dean, 1965) and directly solved for the coefficients by Newton’s method. This method was further simplified by Fenton (1988). The major simplification is that all the partial derivatives are obtained numerically. The most error results from the reason that the wave profile and the Fourier coefficients are simultaneously calculated in Fenton’s theory (Fenton, 1988). To reduce the error, Fenton’s theory requires more series order than 64 (Rienecker and Fenton, 1981). However, since the stream function expansions contain hyperbolic functions, neither of these stream function approaches can be applied for deep-water waves.
Shin (2016) used a Fourier approximation and directly solved the coefficients by Newton’s method, but there are some differences between Shin’s (2016) and Fenton’s theories (Rienecker et al., 1981; Fenton 1988). While Fenton’s theory (Rienecker and Fenton, 1981; Fenton 1988) adopted the stream function (Dean, 1965), Shin (2016) adopted the velocity potential. Fenton’s theory adopted the moving coordinate system introduced by Dean (1965), but Shin (2016) adopted a dimensionless coordinate system. The moving coordinate system requires partial derivatives with regard to the wavelength since the wavelength is coupled to the Fourier coefficients, but the dimensionless coordinate system does not. Therefore, Newton’s method was further simplified (Shin, 2016). While the wave profile and the Fourier coefficients are simultaneously calculated in Fenton’s theory, they are independently calculated by Shin (2016). As a result, the required series order and total error are dramatically reduced (Shin, 2016).
These problems were discussed with Petrobas for the project. It was agreed that Shin’s (2016) wave theory would be applied for calculating wave loads on hard piping riser structures because the theory has less error and provides greater wave loads than 5th-order Stokes theory (Chakrabarti, 1987; De, 1955; Stokes, 1847; Stokes, 1880; DNV, 2010b; Skjelbreia and Hendrickson, 1960). For the application, the results from Shin (2016) were further simplified in this study. The Fourier series is represented for deep-water waves, and all Fourier coefficients and all related parameters are represented with Newton’s polynomials. As a result, this study provides a closed-form solution for deep-water waves. A wave in Miche’s limit was calculated and compared to that of 5th-order Stokes theory. The profiles, velocities, and accelerations were also compared to each other for verification.

### 2. Coordinate Systems

For the description of a progressive water wave, two coordinate systems are adopted. One is the conventional coordinate system (t,x,y) shown in Fig. 1. The origin is located on the still water line. The x-axis is in the direction of wave propagation, the y-axis points upwards, and t is time. The fluid domain is bounded by a free surface y = η(t, x).
The other coordinate system (β,α) is the dimensionless stationary frame shown in Fig. 2. The origin is located at the point under the crest on the reference line, which is the horizontal line passing through two points at ηo = η(±90°) on the free surface and two phases of β = ±90°. Therefore, the wave profile is a fixed, periodic, even function in the system. The horizontal axis is the phase, β = kxωt (πβπ). The vertical axis is the dimensionless elevation from the reference line, α = k(yη0) in αζ, where ζ = k(ηη0) is the dimensionless free surface elevation from the reference line.
The dimensionless coordinate system provides several advantages besides the one mentioned in previous section. One independent variable is removed in the coordinate system. Therefore, the Korteweg-de Vries equation and the Benjamin-Bona equation are presented with ordinary differential equations in the coordinate system. The KFSBC is presented with an exact differential equation in the coordinate system.
One parameter is removed in this coordinate system. While deep-water waves are described with two parameters (i.e., wave height and wave period) in a conventional coordinate system or in a moving coordinate system (Dean, 1965), they are described with only one parameter, the linear steepness θ = (ω2H)/g, in the dimensionless coordinate system. Furthermore, the linear steepness is in the range of 0≤θ<1 since there is a wave-height limitation. Therefore, it is possible to convert the result from Shin (2016) to a closed-form solution.

### 3. Fourier Series Approximation

For deep-water waves, the solution is represented as follows. By using Fourier series approximation, the velocity potential is presented as follows:
##### (1)
ϕ=ωk2n=1Nanenαsinnβ
where an is a Fourier coefficient, and N is the required Fourier series order. The velocity potential satisfies the Laplace equation and the BBC. After differentiating Eq. (1) with respect to x and y, the horizontal water-particle velocity is:
##### (2)
u(β,α)=cn=1Nnanenαcosnβ
where c=defω/kis the wave celerity. The vertical water-particle velocity is:
##### (3)
v(β,α)=cn=1Nnanenαsinnβ
The water-particle accelerations in the horizontal direction and the vertical direction are represented by:
##### (4)
ut=ω2kn=1Nn2anenαsinnβ
##### (5)
vt=-ω2kn=1Nn2anenαcosnβ
From the KFSBC, the wave profile is calculated as follows:
##### (6)
ζ=n=1Nan{enζcosnβ-cosnπ2}
Using Bernoulli’s equation, the pressure is calculated as follows:
##### (7)
p(β,α)ρc2=U(β,α)-U0-12{U2(β,α)+V2(β,α)}+12(U02+V02)-Sαθ
where ρ is the water density, and U and V are dimensionless horizontal and vertical velocities defined by U=defu/c and V=defv/c. U0 =U(π/2,0) and V0 =V(π/2,0) are velocities at the phase of β90° on the free surface. By applying the DFSBC in Eq. (7), the other wave profile is calculated as follows:
##### (8)
ζSθ=U(β,ζ)-U0-12{U2(β,ζ)+V2(β,ζ)}+12(U02+V02)
The linear steepness θ = ω2H/g is a known constant for a particular wave. Dimensionless wave height (steepness) is defined by S = kH (H: wave height), which provides the dispersion relation because the wave number is calculated as k =S/H.

### 4. Wave Profile

An implicit function f(β,ζ)= 0 can be considered as an equation with respect to the dependent variable ζ because the independent variable β is known. Therefore, using Newton’s method, the explicit representation of the function is presented:
##### (9)
ζ(β)=limnζn+1(β)
where n stands for a step of Newton’s method, and ζn + 1 is:
##### (10)
ζn+1(β)=ζn(β)-f(β,ζn)f(β,ζn)
where f(β,ζ) is the error in the KFSBC defined by Eq. (6) as follows:
##### (11)
f(β,ζ)=-ζ+n=1Nan{enζcosnβ-cosnπ2}
f′(β,ζ) is the first-order partial derivative with respect to the variable ζ. Therefore, we have:
##### (12)
f(β,ζ)=-1+n=1Nnanenζcosnβ
Because |ζ|<1 for all waves, the first-step solution ζ1 is calculated with the power series expansion of f in ζ, i.e., f(β,ζ)=m=0f(m)(β,0)m!ζm while ignoring the higher-order terms after the first order. Because f(β,ζ)= 0 for all phases, the power series expansion is a linear equation with respect to ζ, i.e., f(β,0)+ζf’(β,0)= 0. Then we have:
##### (13)
ζ1=n=1Nan{cosnβ-cosnπ2}1-n=1Nnancosnβ
When θ≤0.98992, Newton’s method rapidly and absolutely converges to a complete solution. Therefore, θmax=0.98992 is the limit in this study. Since the limit is greater than the Miche limit (DNV, 2010b; Shin, 2019; Chakrabarti, 1987), which is 0.28π, the proposed method can be used for all deep-water waves.

### 5. Verification

Fourier coefficients were determined so that the two profiles meet at four phases: β = 0°, 30°, 90°, and 180°. Therefore, Eq. (6) satisfies the KFSBC for all phases and satisfies the DFSBC at only the four phases. Eq. (8) satisfies the DFSBC for all phases and satisfies the KFSBC at only the four phases, but the difference of the two profiles is very small.
The other wave profile can be calculated by applying the same method presented in section 4 to Eq. (8) or by substituting the result of Eq. (9) into the right side of Eq. (8). A wave with a period of 6 s and height of 7.87 m was calculated by the proposed method and by 5th-order Stokes theory. The wave is in the Miche limit. Wave profiles are compared in Fig. 3. The red solid line is the profile from KFSBC and was calculated with Eq. (6). The green dotted line is the profile from DFSBC and was calculated with Eq. (8). It is extremely difficult to distinguish the two curves. The purple dashed line is the profile calculated with 5th-order Stokes theory. Bernoulli’s constants were also calculated on the free surface. The blue solid line is Bernoulli’s constant from the proposed method, and the blue dashed line is Bernoulli’s constant calculated with 5th-order Stokes theory.
The constants represent error in the DFSBC. If there is no error in the DFSBC, the constant is presented with a horizontal straight line like the blue solid line from Bernoulli’s principle. Therefore, the blue dashed line shows that Stokes theory has some error in the DFSBC. The blue solid line has a total RMSE (Chakrabarti, 1987) of 7.25×10−2%, but the blue dashed line has a total RMSE of 0.37%. In addition to the error, Stokes theory has 1.42% error in KFSBC, unlike the proposed method. Therefore, the total error of Stokes theory is 1.79%.
The wavelength is 64.8 m in the proposed method and 64.52 m in Stokes theory. L0= 56.21 m is obtained by Airy theory. The wavelength calculated by the proposed method depends on the wave height, unlike Airy theory or trochodial theory.
Water particle velocities on the free surface are presented in Fig. 4. The two solid lines were calculated by the proposed method. The two dashed lines were calculated by 5th-order Stokes theory. The two symmetric curves represent horizontal velocities. There is a big difference in the horizontal velocity under the crest, unlike the wave profiles shown in Fig. 3. As a result, there is more difference in the drag force since the force is proportional to the square of the velocities.
Water particle accelerations on the free surface are presented in Fig. 5. The two solid lines were calculated by the proposed method. The two dashed lines were calculated by 5th-order Stokes theory. The two symmetric curves represent vertical accelerations. There are big differences in the acceleration. As a result, there are big differences in the inertia force since the force is proportional to the acceleration.
Figs. 45 show that Stokes theory gives non-conservative results for offshore structure design. The analysis results are summarized in Table 1.
Even though the series order of the proposed method is less than in Stokes theory’s, the error of the proposed method is lower.

### 6. Solution Method and Curve Fitting Results

This study is based on a Fourier approximation. There are differences in numerical methods to determine the Fourier coefficients and the related parameters between Shin’s (2016) method and the other Fourier approximations (Dean, 1965; Chappeler, 1961; Chaplin, 1979; Rienecker and Fenton, 1981; Fenton, 1988). The result from Shin (2016) is summarized for a closed-form solution in the following.
The solution contains 5 unknown constants: 3 Fourier coefficients an, the steepness S, and the reference line − 0. Two wave profiles from the KFSBC and the DFSBC were presented with implicit functions in Eqs. (6) and (8). Considering the dimensionless coordinate system, the two wave profiles should be even functions. The Fourier series of a periodic even function is presented as f(x)=n=0ancosnxin-πxπ. The coefficients are determined using the orthogonality of trigonometric functions in general.
When f(x) is an implicit function like Eqs. (6) and (8), the method is impossible. A method to solve the problem is to convert the series to a set of algebraic equations that are obtained when we calculate the series at some phases instead of all phases by replacing the infinite series with a truncated series: n=0Nancosnxm=f(xm) for m=1, ... , N.
Because cosnxm and f(xm) are known, we have N algebraic equations for calculating the coefficients, an. Therefore, we have a set of N equations such that Eqs. (6) and (8) are equal to each other at N phases. In this study, N=3 was considered. Additionally, we have two equations: the wave height condition and water depth condition. As a result, we have 5 equations to determine the unknown constants.
Assuming that ζc = ζ(0o), ζ30 = ζ(30o), and ζt = ζ(180o) are known values and applying the idea above to Eq. (6), we have a set of linear algebraic equations with regard to the three coefficients. From the set of equations, the Fourier coefficient a2 is determined as follows:
a2=A22A21
where
##### (15)
A22=defζce-ζc-2ζ30e-ζ303+2ζ30e-(ζ30+2ζt-2ζc)3+ζte-(3ζt-2ζc)
and
##### (16)
A21=def13e(ζ30-2ζt+2ζc)+23e-(ζ30+2ζt-2ζc)+2e-2(ζt-ζc)coshζt-13eζ30-23e-ζ30+2coshζc
The Fourier coefficient a1 is determined as follows:
##### (17)
a1=23{ζ30e-ζ30-a2(12eζ30+e-ζ30)}
The Fourier coefficient a3 is determined as follows:
##### (18)
a3=-2ζ30e-(ζ30+2ζt)3-ζte-3ζt+(13e(ζ30-2ζt)+23e-(ζ30+2ζt)+2e-2ζtcoshζt)a2
Applying the same idea to Eq. (8) and substituting Eqs. (14), (17), and (18) in Eq. (8), we have a set of three nonlinear equations with regard to ζc, ζ30, and ζt. From the wave height condition, we have the following:
##### (19)
S=ζc-ζt
We also have an equation from the water depth condition, in which the still water line is the average of the wave profile during a wave period or over a wavelength. Because the horizontal axis of the conventional coordinate system is on the still water line, the reference line is represented as:
##### (20)
kη0=-12π-ππζdβ
Therefore, we have five nonlinear equations, which were solved by Newton’s method by Shin (2016). All the unknown constants are functions of the linear steepness θ, which is a known constant for a particular wave in the range of 0≤θ<1. They were calculated with a highly dense interval of the linear steepness, and the results were shown by Shin (2016). The constants are represented with Newton’s polynomials in this study. For the curve fitting, the divided differences method (Gerald and Wheatley, 2006) is considered. For θ≤0.9, the steepness is presented as follows:
##### (21)
S=0.99751F0-0.0729F1-0.21233333F2+0.11125F3+0.07333333F4-0.14722222F5+0.176587302F6-0.12400794F7+0.270061728F8
where Fi is a Newton basis polynomial defined as Fi=defn=0i(θ-0.1n). For 0.9<θ<1, the steepness is:
##### (22)
S=0.776933+0.6819G0-0.11G1+1.6666667G2-50G3+2333.33333G4-75000G5+2242063.492G6-52579365.1G7+1948302469G8
where Gi=n=0i{θ-(0.9+0.01n)}. The wave number is determined by Eq. (21) or (22) and k =S/H. For θ≤0.9, the ratio of the trough depth to crest height is presented as follows:
##### (23)
λ=def-ζtζc=1-0.95155346F0+0.449837676F1-0.12765248F2-0.09413857F3+0.312588656F4-0.90252346F5+1.622263968F6-3.25526214F7+1.865838796F8
For 0.9<θ<1, the ratio of the trough depth to crest height is presented as follows:
##### (24)
λ=0.385658-0.5997714G0-1.12845501G1-10.1573878G2-177.266276G3+470.1400869G4-123978.831G4-1305636.873G6-130109452G7-19577000000G8
For θ≤0.9, the ratio of the elevation ζ30 at a phase of 30° to the crest height is presented as follows:
##### (25)
λ30=def-ζ30ζc=32-0.0639043F0-0.06427581F1-0.04834541F2-0.06425683F3-0.0302724F4-0.19240911F5+0.003370865F6-1.18380101F7-3.46302865F8
For 0.9<θ<1, the ratio of the elevation ζ30 at phase of 30° to the crest height is presented as follows:
##### (26)
λ30=0.697103-0.67038918G0-2.80988095G1-21.3795326G2-191.85558G3-4414.7284G4-40908.9389G5-2822028.06G6-99414564.7G7-37945000000G8
By using the definition in Eq. (23) and Eq. (19), we have:
##### (27)
ζc=S1+λ
Therefore, by substituting Eqs. (21) or (22) and (23) or (24) in Eq. (27), the crest elevation is determined. By using the definition in Eq. (23), we have:
##### (28)
ζt=-λζc
By substituting Eqs. (23) or (24) and (27) in Eq. (28), the trough elevation is determined. By using the definition in Eq. (25), we have:
##### (29)
ζ30=λ30ζc
By substituting Eqs. (25) or (26) and (27) in Eq. (29), the wave elevation at a phase of β = 30° is determined. The reference line is numerically calculated by applying Eq. (9) in Eq. (20). The reference line was also calculated with a highly dense interval of the linear steepness. The result is represented with Newton’s polynomials as follows:
##### (30)
kη0=-(ζt+Ikπ)
For θ≤0.9, the parameter Ik is presented as:
##### (31)
Ik=1.5277031F0-0.502451F1-0.3040983F2+0.208770833F3-0.03169167F4-0.214652778F5-0.102063492F6-0.6900298F7-4.066964286F8
For 0.9<θ<1, the parameter Ik is presented as:
##### (32)
Ik=0.89942883+0.123682G0-2.9221G1-19.328333G2-216.75G3-3270G4-67625G5-2072023.81G6-284632937G7-21853395062G8
The dimensionless elevation is determined by Eq. (9), the reference line 0 is determined by Eq. (30), wave number is determined by Eq. (21) or Eq. (22) and then, substituting the three results in the definition of the dimensionless elevation, ζ = k(ηη0), the wave profile is calculated as:
##### (33)
η=ζ+kη0k
ζc, ζ30, and ζt are merely parameters to calculate the Fourier coefficients. The wave profile is calculated with Eqs. (9) and (33). This is one of the major differences between Shin’s (2016) theory and Fenton’s theory (Rienecker et al., 1981; Fenton 1988).

### 7. Conclusions

The purpose of this study was to provide a closed-form solution for deep-water waves with error less than 1%. For this purpose, the result from Shin (2016) was simplified. The major simplification is that all Fourier coefficients and all parameters are presented with Newton’s polynomials for a closed-form solution and engineering application. Therefore, a numerical procedure is not necessary for calculating the coefficients and the parameters any more.
The required Fourier series order is N = 3 in this study, while more than 11 is required by Dean’s stream function theory (DNV, 2010b), and more than N = 64 is required by Fenton’s theory (Rienecker and Fenton, 1981). The series order of 5th-order Stokes theory is 5. Therefore, the required series order is dramatically reduced. The result has less error, is simpler, and gives greater water particle velocities and water particle accelerations than the 5th-order Stokes wave theory. Therefore, the Stokes wave theory is not conservative, and the proposed method is more suitable for offshore structure design.

### Acknowledgements

We would like to thank Petrobras for applying the proposed method in the FPSO project.

### Notes

Conflict of Interest

##### Fig. 1.
A conventional coordinate system for a progressive wave (SWL: still water line)
##### Fig. 2.
A dimensionless coordinate system for a progressive wave
##### Fig. 3.
Wave profiles and Bernoulli’s constants on the free surface
##### Fig. 4.
Water particle velocities on the free surface
##### Fig. 5.
Water particle accelerations on the free surface
##### Table 1.
Analysis results of the wave with period of 6 s and height of 7.87 m.
Stokes theory This study
Error in KFSBC 1.42% 0
Error in DFSBC 0.37% 7.25×10−2%
Wavelength 64.52 m 64.8 m
Series order 5 3

### References

Chakrabarti, SK., 1987. Hydrodynamics of Offshore Structures. London, UK: Computational Mechanics Publications.

Chaplin, JR., 1979. Developments of Stream-Function Wave Theory. Journal of Coastal Engineering. 3, 179-205 https://doi.org/10.1016/0378-3839(79)90020-6 .

Chappelear, JE., 1961. Direct Numerical Calculation of Wave Properties. Journal of Geophysical Research. 66(2):501-508 https://doi.org/10.1029/JZ066i002p00501 .

Cokelet, ED., 1977. Steep Gravity Waves in Water of Arbitrary Uniform Depth. Philosophical Transaction of the Royal Society of London, Series A, Mathematical and Physical Sciences. 286(1335):183-230 https://doi.org/10.1098/rsta.1977.0113 .

De, SC., 1955. Contributions to the Theory of Stokes Waves. Proceedings of the Cambridge Philosophical Society. 51, 713-736.

Dean, RG., 1965. Stream Function Representation of Nonlinear Ocean Waves. Journal of Geophysical Research. 70(18):4561-4572 https://doi.org/10.1029/JZ070i018p04561 .

Det Norske Veritas. (DNV), 2010a. Column-Stabilized Units. Recommended Practice DNV-RP-C103..

Det Norske Veritas. (DNV), 2010b. Environmental Conditions and Environmental Loads. Recommended Practice DNV-RP-C205..

Fenton, JD., 1988. The Numerical Solution of Steady Water Wave Problems. Computers & Geosciences. 14(3):357-368 https://doi.org/10.1016/0098-3004(88)90066-0 .

Henry, D., 2008. On Gerstner’s Water Wave. Journal of Nonlinear Mathematical Physics. 15(2):87-95 https://doi.org/10.2991/jnmp.2008.15.S2.7 .

Gerald, CF., Wheatley, PO., 2006. Applied Numerical Analysis. 7th ed Pearson Education Inc.

Rankine, WJM., 1863. On the Exact form of Waves Near the Surface of Deep Water. Philosophical Transactions. 153, 127-138 https://doi.org/10.1098/rstl.1863.0006 .

Rienecker, MM., Fenton, JD., 1981. A Fourier Approximation Method for Steady Water Waves. Journal of Fluid Mechanics. 104, 119-137 https://doi.org/10.1017/S0022112081002851 .

Schwartz, LW., 1974. Computer Extension and Analytic Continuation of Stokes’ Expansion for Gravity Waves. Journal of Fluid Mechanics. 62(3):553-578 https://doi.org/10.1017/S0022112074000802 .

Skjelbreia, L., Hendrickson, J., 1960. Fifth Order Gravity Wave Theory. Proceedings of 7th Conference on Coastal Engineering The Hague, Netherlands: 184-196 https://doi.org/10.9753/icce.v7.10 .

Shin, J., 2016. Analytical Approximation in Deep Water Waves. Journal of Advanced Research in Ocean Engineering. 2(1):1-11 https://doi.org/10.5574/JAROE.2016.2.1.001 .

Shin, J., 2019. A Regression Analysis Result for Water Waves on Irrotational Flow Over a Horizontal Bed. International Journal of Offshore Polar Engineering. IJOPE. 29(4):461-466 https://doi.org/10.17736/ijope.2019.hc17 .

Stokes, GG., 1847. On the Theory of Oscillatory Waves. Transactions of the Cambridge Philosophical Society. 8, 441-473.

Stokes, GG., 1880. Supplement to a Paper on the Theory of Oscillatory Wave. Mathematical and Physical Papers. 1, 314-326.

TOOLS
Share :
METRICS
• 0 Crossref
•   Scopus
• 182 View


text:
Properties

 Modulus $4889$ Structure $$C_{4888}$$ Order $4888$

Show commands for: Pari/GP / SageMath

sage: H = DirichletGroup(4889)

pari: g = idealstar(,4889,2)

Character group

 sage: G.order()  pari: g.no Order = 4888 sage: H.invariants()  pari: g.cyc Structure = $$C_{4888}$$ sage: H.gens()  pari: g.gen Generators = $\chi_{4889}(3,\cdot)$

First 32 of 4888 characters

Each row describes a character. When available, the columns show the orbit label, order of the character, whether the character is primitive, and several values of the character.

Character Orbit Order Primitive $$-1$$ $$1$$ $$2$$ $$3$$ $$4$$ $$5$$ $$6$$ $$7$$ $$8$$ $$9$$ $$10$$ $$11$$
$$\chi_{4889}(1,\cdot)$$ 4889.a 1 no $$1$$ $$1$$ $$1$$ $$1$$ $$1$$ $$1$$ $$1$$ $$1$$ $$1$$ $$1$$ $$1$$ $$1$$
$$\chi_{4889}(2,\cdot)$$ 4889.o 2444 yes $$1$$ $$1$$ $$e\left(\frac{647}{1222}\right)$$ $$e\left(\frac{617}{2444}\right)$$ $$e\left(\frac{36}{611}\right)$$ $$e\left(\frac{419}{611}\right)$$ $$e\left(\frac{147}{188}\right)$$ $$e\left(\frac{1057}{2444}\right)$$ $$e\left(\frac{719}{1222}\right)$$ $$e\left(\frac{617}{1222}\right)$$ $$e\left(\frac{263}{1222}\right)$$ $$e\left(\frac{361}{1222}\right)$$
$$\chi_{4889}(3,\cdot)$$ 4889.p 4888 yes $$-1$$ $$1$$ $$e\left(\frac{617}{2444}\right)$$ $$e\left(\frac{1}{4888}\right)$$ $$e\left(\frac{617}{1222}\right)$$ $$e\left(\frac{579}{1222}\right)$$ $$e\left(\frac{95}{376}\right)$$ $$e\left(\frac{889}{4888}\right)$$ $$e\left(\frac{1851}{2444}\right)$$ $$e\left(\frac{1}{2444}\right)$$ $$e\left(\frac{1775}{2444}\right)$$ $$e\left(\frac{1995}{2444}\right)$$
$$\chi_{4889}(4,\cdot)$$ 4889.n 1222 yes $$1$$ $$1$$ $$e\left(\frac{36}{611}\right)$$ $$e\left(\frac{617}{1222}\right)$$ $$e\left(\frac{72}{611}\right)$$ $$e\left(\frac{227}{611}\right)$$ $$e\left(\frac{53}{94}\right)$$ $$e\left(\frac{1057}{1222}\right)$$ $$e\left(\frac{108}{611}\right)$$ $$e\left(\frac{6}{611}\right)$$ $$e\left(\frac{263}{611}\right)$$ $$e\left(\frac{361}{611}\right)$$
$$\chi_{4889}(5,\cdot)$$ 4889.n 1222 yes $$1$$ $$1$$ $$e\left(\frac{419}{611}\right)$$ $$e\left(\frac{579}{1222}\right)$$ $$e\left(\frac{227}{611}\right)$$ $$e\left(\frac{215}{611}\right)$$ $$e\left(\frac{15}{94}\right)$$ $$e\left(\frac{269}{1222}\right)$$ $$e\left(\frac{35}{611}\right)$$ $$e\left(\frac{579}{611}\right)$$ $$e\left(\frac{23}{611}\right)$$ $$e\left(\frac{315}{611}\right)$$
$$\chi_{4889}(6,\cdot)$$ 4889.l 376 yes $$-1$$ $$1$$ $$e\left(\frac{147}{188}\right)$$ $$e\left(\frac{95}{376}\right)$$ $$e\left(\frac{53}{94}\right)$$ $$e\left(\frac{15}{94}\right)$$ $$e\left(\frac{13}{376}\right)$$ $$e\left(\frac{231}{376}\right)$$ $$e\left(\frac{65}{188}\right)$$ $$e\left(\frac{95}{188}\right)$$ $$e\left(\frac{177}{188}\right)$$ $$e\left(\frac{21}{188}\right)$$
$$\chi_{4889}(7,\cdot)$$ 4889.p 4888 yes $$-1$$ $$1$$ $$e\left(\frac{1057}{2444}\right)$$ $$e\left(\frac{889}{4888}\right)$$ $$e\left(\frac{1057}{1222}\right)$$ $$e\left(\frac{269}{1222}\right)$$ $$e\left(\frac{231}{376}\right)$$ $$e\left(\frac{3353}{4888}\right)$$ $$e\left(\frac{727}{2444}\right)$$ $$e\left(\frac{889}{2444}\right)$$ $$e\left(\frac{1595}{2444}\right)$$ $$e\left(\frac{1655}{2444}\right)$$
$$\chi_{4889}(8,\cdot)$$ 4889.o 2444 yes $$1$$ $$1$$ $$e\left(\frac{719}{1222}\right)$$ $$e\left(\frac{1851}{2444}\right)$$ $$e\left(\frac{108}{611}\right)$$ $$e\left(\frac{35}{611}\right)$$ $$e\left(\frac{65}{188}\right)$$ $$e\left(\frac{727}{2444}\right)$$ $$e\left(\frac{935}{1222}\right)$$ $$e\left(\frac{629}{1222}\right)$$ $$e\left(\frac{789}{1222}\right)$$ $$e\left(\frac{1083}{1222}\right)$$
$$\chi_{4889}(9,\cdot)$$ 4889.o 2444 yes $$1$$ $$1$$ $$e\left(\frac{617}{1222}\right)$$ $$e\left(\frac{1}{2444}\right)$$ $$e\left(\frac{6}{611}\right)$$ $$e\left(\frac{579}{611}\right)$$ $$e\left(\frac{95}{188}\right)$$ $$e\left(\frac{889}{2444}\right)$$ $$e\left(\frac{629}{1222}\right)$$ $$e\left(\frac{1}{1222}\right)$$ $$e\left(\frac{553}{1222}\right)$$ $$e\left(\frac{773}{1222}\right)$$
$$\chi_{4889}(10,\cdot)$$ 4889.o 2444 yes $$1$$ $$1$$ $$e\left(\frac{263}{1222}\right)$$ $$e\left(\frac{1775}{2444}\right)$$ $$e\left(\frac{263}{611}\right)$$ $$e\left(\frac{23}{611}\right)$$ $$e\left(\frac{177}{188}\right)$$ $$e\left(\frac{1595}{2444}\right)$$ $$e\left(\frac{789}{1222}\right)$$ $$e\left(\frac{553}{1222}\right)$$ $$e\left(\frac{309}{1222}\right)$$ $$e\left(\frac{991}{1222}\right)$$
$$\chi_{4889}(11,\cdot)$$ 4889.o 2444 yes $$1$$ $$1$$ $$e\left(\frac{361}{1222}\right)$$ $$e\left(\frac{1995}{2444}\right)$$ $$e\left(\frac{361}{611}\right)$$ $$e\left(\frac{315}{611}\right)$$ $$e\left(\frac{21}{188}\right)$$ $$e\left(\frac{1655}{2444}\right)$$ $$e\left(\frac{1083}{1222}\right)$$ $$e\left(\frac{773}{1222}\right)$$ $$e\left(\frac{991}{1222}\right)$$ $$e\left(\frac{1193}{1222}\right)$$
$$\chi_{4889}(12,\cdot)$$ 4889.p 4888 yes $$-1$$ $$1$$ $$e\left(\frac{761}{2444}\right)$$ $$e\left(\frac{2469}{4888}\right)$$ $$e\left(\frac{761}{1222}\right)$$ $$e\left(\frac{1033}{1222}\right)$$ $$e\left(\frac{307}{376}\right)$$ $$e\left(\frac{229}{4888}\right)$$ $$e\left(\frac{2283}{2444}\right)$$ $$e\left(\frac{25}{2444}\right)$$ $$e\left(\frac{383}{2444}\right)$$ $$e\left(\frac{995}{2444}\right)$$
$$\chi_{4889}(13,\cdot)$$ 4889.o 2444 yes $$1$$ $$1$$ $$e\left(\frac{797}{1222}\right)$$ $$e\left(\frac{1253}{2444}\right)$$ $$e\left(\frac{186}{611}\right)$$ $$e\left(\frac{230}{611}\right)$$ $$e\left(\frac{31}{188}\right)$$ $$e\left(\frac{1897}{2444}\right)$$ $$e\left(\frac{1169}{1222}\right)$$ $$e\left(\frac{31}{1222}\right)$$ $$e\left(\frac{35}{1222}\right)$$ $$e\left(\frac{745}{1222}\right)$$
$$\chi_{4889}(14,\cdot)$$ 4889.p 4888 yes $$-1$$ $$1$$ $$e\left(\frac{2351}{2444}\right)$$ $$e\left(\frac{2123}{4888}\right)$$ $$e\left(\frac{1129}{1222}\right)$$ $$e\left(\frac{1107}{1222}\right)$$ $$e\left(\frac{149}{376}\right)$$ $$e\left(\frac{579}{4888}\right)$$ $$e\left(\frac{2165}{2444}\right)$$ $$e\left(\frac{2123}{2444}\right)$$ $$e\left(\frac{2121}{2444}\right)$$ $$e\left(\frac{2377}{2444}\right)$$
$$\chi_{4889}(15,\cdot)$$ 4889.p 4888 yes $$-1$$ $$1$$ $$e\left(\frac{2293}{2444}\right)$$ $$e\left(\frac{2317}{4888}\right)$$ $$e\left(\frac{1071}{1222}\right)$$ $$e\left(\frac{1009}{1222}\right)$$ $$e\left(\frac{155}{376}\right)$$ $$e\left(\frac{1965}{4888}\right)$$ $$e\left(\frac{1991}{2444}\right)$$ $$e\left(\frac{2317}{2444}\right)$$ $$e\left(\frac{1867}{2444}\right)$$ $$e\left(\frac{811}{2444}\right)$$
$$\chi_{4889}(16,\cdot)$$ 4889.m 611 yes $$1$$ $$1$$ $$e\left(\frac{72}{611}\right)$$ $$e\left(\frac{6}{611}\right)$$ $$e\left(\frac{144}{611}\right)$$ $$e\left(\frac{454}{611}\right)$$ $$e\left(\frac{6}{47}\right)$$ $$e\left(\frac{446}{611}\right)$$ $$e\left(\frac{216}{611}\right)$$ $$e\left(\frac{12}{611}\right)$$ $$e\left(\frac{526}{611}\right)$$ $$e\left(\frac{111}{611}\right)$$
$$\chi_{4889}(17,\cdot)$$ 4889.p 4888 yes $$-1$$ $$1$$ $$e\left(\frac{685}{2444}\right)$$ $$e\left(\frac{4493}{4888}\right)$$ $$e\left(\frac{685}{1222}\right)$$ $$e\left(\frac{1031}{1222}\right)$$ $$e\left(\frac{75}{376}\right)$$ $$e\left(\frac{781}{4888}\right)$$ $$e\left(\frac{2055}{2444}\right)$$ $$e\left(\frac{2049}{2444}\right)$$ $$e\left(\frac{303}{2444}\right)$$ $$e\left(\frac{1387}{2444}\right)$$
$$\chi_{4889}(18,\cdot)$$ 4889.n 1222 yes $$1$$ $$1$$ $$e\left(\frac{21}{611}\right)$$ $$e\left(\frac{309}{1222}\right)$$ $$e\left(\frac{42}{611}\right)$$ $$e\left(\frac{387}{611}\right)$$ $$e\left(\frac{27}{94}\right)$$ $$e\left(\frac{973}{1222}\right)$$ $$e\left(\frac{63}{611}\right)$$ $$e\left(\frac{309}{611}\right)$$ $$e\left(\frac{408}{611}\right)$$ $$e\left(\frac{567}{611}\right)$$
$$\chi_{4889}(19,\cdot)$$ 4889.n 1222 yes $$1$$ $$1$$ $$e\left(\frac{83}{611}\right)$$ $$e\left(\frac{523}{1222}\right)$$ $$e\left(\frac{166}{611}\right)$$ $$e\left(\frac{133}{611}\right)$$ $$e\left(\frac{53}{94}\right)$$ $$e\left(\frac{587}{1222}\right)$$ $$e\left(\frac{249}{611}\right)$$ $$e\left(\frac{523}{611}\right)$$ $$e\left(\frac{216}{611}\right)$$ $$e\left(\frac{408}{611}\right)$$
$$\chi_{4889}(20,\cdot)$$ 4889.g 47 yes $$1$$ $$1$$ $$e\left(\frac{35}{47}\right)$$ $$e\left(\frac{46}{47}\right)$$ $$e\left(\frac{23}{47}\right)$$ $$e\left(\frac{34}{47}\right)$$ $$e\left(\frac{34}{47}\right)$$ $$e\left(\frac{4}{47}\right)$$ $$e\left(\frac{11}{47}\right)$$ $$e\left(\frac{45}{47}\right)$$ $$e\left(\frac{22}{47}\right)$$ $$e\left(\frac{5}{47}\right)$$
$$\chi_{4889}(21,\cdot)$$ 4889.o 2444 yes $$1$$ $$1$$ $$e\left(\frac{837}{1222}\right)$$ $$e\left(\frac{445}{2444}\right)$$ $$e\left(\frac{226}{611}\right)$$ $$e\left(\frac{424}{611}\right)$$ $$e\left(\frac{163}{188}\right)$$ $$e\left(\frac{2121}{2444}\right)$$ $$e\left(\frac{67}{1222}\right)$$ $$e\left(\frac{445}{1222}\right)$$ $$e\left(\frac{463}{1222}\right)$$ $$e\left(\frac{603}{1222}\right)$$
$$\chi_{4889}(22,\cdot)$$ 4889.m 611 yes $$1$$ $$1$$ $$e\left(\frac{504}{611}\right)$$ $$e\left(\frac{42}{611}\right)$$ $$e\left(\frac{397}{611}\right)$$ $$e\left(\frac{123}{611}\right)$$ $$e\left(\frac{42}{47}\right)$$ $$e\left(\frac{67}{611}\right)$$ $$e\left(\frac{290}{611}\right)$$ $$e\left(\frac{84}{611}\right)$$ $$e\left(\frac{16}{611}\right)$$ $$e\left(\frac{166}{611}\right)$$
$$\chi_{4889}(23,\cdot)$$ 4889.m 611 yes $$1$$ $$1$$ $$e\left(\frac{367}{611}\right)$$ $$e\left(\frac{387}{611}\right)$$ $$e\left(\frac{123}{611}\right)$$ $$e\left(\frac{566}{611}\right)$$ $$e\left(\frac{11}{47}\right)$$ $$e\left(\frac{50}{611}\right)$$ $$e\left(\frac{490}{611}\right)$$ $$e\left(\frac{163}{611}\right)$$ $$e\left(\frac{322}{611}\right)$$ $$e\left(\frac{133}{611}\right)$$
$$\chi_{4889}(24,\cdot)$$ 4889.p 4888 yes $$-1$$ $$1$$ $$e\left(\frac{2055}{2444}\right)$$ $$e\left(\frac{3703}{4888}\right)$$ $$e\left(\frac{833}{1222}\right)$$ $$e\left(\frac{649}{1222}\right)$$ $$e\left(\frac{225}{376}\right)$$ $$e\left(\frac{2343}{4888}\right)$$ $$e\left(\frac{1277}{2444}\right)$$ $$e\left(\frac{1259}{2444}\right)$$ $$e\left(\frac{909}{2444}\right)$$ $$e\left(\frac{1717}{2444}\right)$$
$$\chi_{4889}(25,\cdot)$$ 4889.m 611 yes $$1$$ $$1$$ $$e\left(\frac{227}{611}\right)$$ $$e\left(\frac{579}{611}\right)$$ $$e\left(\frac{454}{611}\right)$$ $$e\left(\frac{430}{611}\right)$$ $$e\left(\frac{15}{47}\right)$$ $$e\left(\frac{269}{611}\right)$$ $$e\left(\frac{70}{611}\right)$$ $$e\left(\frac{547}{611}\right)$$ $$e\left(\frac{46}{611}\right)$$ $$e\left(\frac{19}{611}\right)$$
$$\chi_{4889}(26,\cdot)$$ 4889.n 1222 yes $$1$$ $$1$$ $$e\left(\frac{111}{611}\right)$$ $$e\left(\frac{935}{1222}\right)$$ $$e\left(\frac{222}{611}\right)$$ $$e\left(\frac{38}{611}\right)$$ $$e\left(\frac{89}{94}\right)$$ $$e\left(\frac{255}{1222}\right)$$ $$e\left(\frac{333}{611}\right)$$ $$e\left(\frac{324}{611}\right)$$ $$e\left(\frac{149}{611}\right)$$ $$e\left(\frac{553}{611}\right)$$
$$\chi_{4889}(27,\cdot)$$ 4889.p 4888 yes $$-1$$ $$1$$ $$e\left(\frac{1851}{2444}\right)$$ $$e\left(\frac{3}{4888}\right)$$ $$e\left(\frac{629}{1222}\right)$$ $$e\left(\frac{515}{1222}\right)$$ $$e\left(\frac{285}{376}\right)$$ $$e\left(\frac{2667}{4888}\right)$$ $$e\left(\frac{665}{2444}\right)$$ $$e\left(\frac{3}{2444}\right)$$ $$e\left(\frac{437}{2444}\right)$$ $$e\left(\frac{1097}{2444}\right)$$
$$\chi_{4889}(28,\cdot)$$ 4889.p 4888 yes $$-1$$ $$1$$ $$e\left(\frac{1201}{2444}\right)$$ $$e\left(\frac{3357}{4888}\right)$$ $$e\left(\frac{1201}{1222}\right)$$ $$e\left(\frac{723}{1222}\right)$$ $$e\left(\frac{67}{376}\right)$$ $$e\left(\frac{2693}{4888}\right)$$ $$e\left(\frac{1159}{2444}\right)$$ $$e\left(\frac{913}{2444}\right)$$ $$e\left(\frac{203}{2444}\right)$$ $$e\left(\frac{655}{2444}\right)$$
$$\chi_{4889}(29,\cdot)$$ 4889.p 4888 yes $$-1$$ $$1$$ $$e\left(\frac{17}{2444}\right)$$ $$e\left(\frac{2345}{4888}\right)$$ $$e\left(\frac{17}{1222}\right)$$ $$e\left(\frac{113}{1222}\right)$$ $$e\left(\frac{183}{376}\right)$$ $$e\left(\frac{2417}{4888}\right)$$ $$e\left(\frac{51}{2444}\right)$$ $$e\left(\frac{2345}{2444}\right)$$ $$e\left(\frac{243}{2444}\right)$$ $$e\left(\frac{459}{2444}\right)$$
$$\chi_{4889}(30,\cdot)$$ 4889.p 4888 yes $$-1$$ $$1$$ $$e\left(\frac{1143}{2444}\right)$$ $$e\left(\frac{3551}{4888}\right)$$ $$e\left(\frac{1143}{1222}\right)$$ $$e\left(\frac{625}{1222}\right)$$ $$e\left(\frac{73}{376}\right)$$ $$e\left(\frac{4079}{4888}\right)$$ $$e\left(\frac{985}{2444}\right)$$ $$e\left(\frac{1107}{2444}\right)$$ $$e\left(\frac{2393}{2444}\right)$$ $$e\left(\frac{1533}{2444}\right)$$
$$\chi_{4889}(31,\cdot)$$ 4889.p 4888 yes $$-1$$ $$1$$ $$e\left(\frac{71}{2444}\right)$$ $$e\left(\frac{1743}{4888}\right)$$ $$e\left(\frac{71}{1222}\right)$$ $$e\left(\frac{1047}{1222}\right)$$ $$e\left(\frac{145}{376}\right)$$ $$e\left(\frac{31}{4888}\right)$$ $$e\left(\frac{213}{2444}\right)$$ $$e\left(\frac{1743}{2444}\right)$$ $$e\left(\frac{2165}{2444}\right)$$ $$e\left(\frac{1917}{2444}\right)$$
$$\chi_{4889}(32,\cdot)$$ 4889.o 2444 yes $$1$$ $$1$$ $$e\left(\frac{791}{1222}\right)$$ $$e\left(\frac{641}{2444}\right)$$ $$e\left(\frac{180}{611}\right)$$ $$e\left(\frac{262}{611}\right)$$ $$e\left(\frac{171}{188}\right)$$ $$e\left(\frac{397}{2444}\right)$$ $$e\left(\frac{1151}{1222}\right)$$ $$e\left(\frac{641}{1222}\right)$$ $$e\left(\frac{93}{1222}\right)$$ $$e\left(\frac{583}{1222}\right)$$


text:
# Type [420], CY of degree 16 via linkage -- lifting to an irreducible 3-fold

We construct via linkage an arithmetically Gorenstein irreducible 3-fold $X = X_{16} \bf{P}^7$, of degree 16, having Betti table of type [420]. For an artinian reduction $A_F$, the quadratic part of the ideal $F^\perp$ is the ideal of six points on a twisted cubic curve. We construct $X_{16}$ as an anticanonical divisor in the fourfold intersection of a cubic scroll and quadric.

The betti table is $\phantom{WWWW} \begin{matrix} &0&1&2&3&4\\ \text{total:}&1&6&10&6&1\\ \text{0:}&1&\text{.}&\text{.}&\text{.}&\text{.}\\ \text{1:}&\text{.}&4&2&\text{.}&\text{.}\\ \text{2:}&\text{.}&2&6&2&\text{.}\\ \text{3:}&\text{.}&\text{.}&2&4&\text{.}\\ \text{4:}&\text{.}&\text{.}&\text{.}&\text{.}&1\\ \end{matrix}$

 i1 : kk=QQ; i2 : U=kk[y0,y1,y2,y3,y4,y5,y6,y7]; i3 : P4=ideal(y0,y1,y2);--a P4 o3 : Ideal of U i4 : T3=minors(2,matrix{{y0,y1,y2},{y3,y4,y5}});--a cubic 5-fold scroll with P4 as a ruling o4 : Ideal of U i5 : X2=P4+ideal(random(2,U));-- a quadric 3-fold in T3 o5 : Ideal of U i6 : X18=T3+ideal(random(2,X2),random(3,X2));--a 3-fold of degree 18 in T3 that contains X2 o6 : Ideal of U i7 : X16=X18:X2;--a 3-fold of degree 16 in T3 with betti table of type 420 o7 : Ideal of U
 i8 : (dim X16, degree X16) o8 = (4, 16) o8 : Sequence i9 : betti res X16 0 1 2 3 4 o9 = total: 1 6 10 6 1 0: 1 . . . . 1: . 4 2 . . 2: . 2 6 2 . 3: . . 2 4 . 4: . . . . 1 o9 : BettiTally


text:
# subsets and sets

I'm not so bad in math however I want to understand math the way mathematicians do, so I picked up this book How to Think Like a Mathematician. The book seems the book that I'm looking for. Definitely, it gonna be very long dark tunnel to me until I see the light. Any ways, he started with sets and I came across the following

1- For any set $X$, we have $X \subseteq X$.

2- For any set $X$, we have $\emptyset \subseteq X$.

I couldn't imagine what do the two aforementioned statements imply. For the first one, how come a set is part of or equal itself? I can imagine the equality here but not the partition. The second statement, how come a non-empty set has an empty set? For example, let $X = \{1, 2, 3\}$, now why $\emptyset \subseteq X$?

-
If you already understand why $X\subseteq X$ (because the little underline means that it is possible that $X=X$), then the other question has been thoroughly chewed all across the site. – Asaf Karagila Jun 7 '14 at 11:06
Of course, some authors skip the underline and write $X \subset X$ to mean "X is a subset of (possibly equal to) X," and would write $\{1\} \subsetneq \{1, 2\}$ to mean that the first set is a proper subset of (not equal to) the second. – Strants Jun 8 '14 at 1:26
@AsafKaragila, no I'm not understanding $X \subset X$ however $X = X$ makes sense. – CroCo Jun 8 '14 at 1:31
I didn't use $X\subset X$ on purpose there. – Asaf Karagila Jun 8 '14 at 6:42

A very good principle when starting out in any new area of maths: get really, really clear about key definitions. Don't just make a stab at guessing (or go by the perhaps misleading everyday terminology used in labelling, or by an informal gloss on the definition): look carefully at how key notions are rigorously defined.

Now, what does $X \subseteq Y$ mean, officially?

$X \subseteq Y$ holds, by definition, if and only if, for any $x$, if $x \in X$ then $x \in Y$.

Informally, yes, you might be tempted to gloss $X \subseteq Y$ as e.g. "$X$ is a part of $Y$"; that can be useful, but as you are finding, it can also be misleading. So forget for a moment the rough informal gloss and concentrate on the official definition.

Applied to your two cases, we have first, by definition

$X \subseteq X$ if and only if, for any $x$, if $x \in X$ then $x \in X$.

Well now ask: Is it the case that for any $x$, if $x \in X$ then $x \in X$? And so what does that tell you about $X \subseteq X$?

Second, we have by definition

$\emptyset \subseteq X$ if and only if, for any $x$, if $x \in \emptyset$ then $x \in X$.

Well now ask: Is it the case that for any $x$, if $x \in \emptyset$ then $x \in X$? Recall that $x \in \emptyset$ is always false: what happens to quantified conditionals where the antecedent is always false? And so what does that tell you about $\emptyset \subseteq X$?

-
I found it hard to understand the explanation of the second one. Can you explain it any more clearly? – idiosincrasia23 Jun 7 '14 at 13:15
@AaKASH: Recall that $\emptyset$ is empty (has no elements). So $x\in\emptyset$ is always false... there is nothing in $\emptyset$ so surely $x$ is not in there! Now any implication like "if A then B" in which A is false is always true. So if I say "If $x\in\emptyset$, then I have cats for ears," that implication is (vacuously) true because my hypothesis is false. – user59083 Jun 7 '14 at 16:10
+1 for the first paragraph alone. – Michael Albanese Jun 8 '14 at 3:40

Both questions really boil down to how mathematicians use logic.

1.) $X \subseteq X$ means that for all elements of $X$ they are elements of $X$.

2.) $\emptyset \subseteq X$ means that for all elements of $\emptyset$ they are elements of $X$.

To see why 1.) is true, consider an element $x$ in the set $X$, well then we know that $x$ is in $X$ (!) and so we have shown that all elements from $X$ are also elements of $X$.

To see why 2.) is true, we must show that given an element of $\emptyset$ it must belong to $X$. But, there are no elements of $\emptyset$ and so the implication is (trivially) satisfied. If you've studied truth tables then this corresponds to the case for "$P \Rightarrow Q$" where "P" is false.

-
you confused me more. For 1.), you are saying "for all elements of $X$ they are elements of $X$." Is there any doubt about it? Why this unintuitive way to explain this stuff. – CroCo Jun 7 '14 at 7:25
Of course there's no doubt about it; that's why $X\subseteq X$ :p The symbol "$\subseteq$" has been defined so that it makes sense to ask for any $Y$ whether $Y\subseteq X$. Hence we can ask about $X$ itself; the answer turns out to be pretty trivial, but sometimes trivial truths are good to know. – Malice Vidrine Jun 7 '14 at 8:58
@MaliceVidrine, this $Y \subseteq X$ makes perfect sense to me. Also, $X = X$; Because $\subseteq$ implies $X \subset X$, this is where I got confused. How come a set becomes a part of itself? – CroCo Jun 8 '14 at 1:24
The definition of $\subseteq$ has been explained. $X\subseteq X$ because of the very meaning of $\subseteq$--it's a logical truth that $X$ contains all the things that $X$ contains. – Malice Vidrine Jun 8 '14 at 1:54
@CroCo:$Y\subseteq X$ does not imply $Y\subset X.$ The notation $Y\subseteq X$ means $Y\subset X$ or $Y=X.$ In general $P$ or $Q$ does not imply $P$. All it means is that at least one of the statements $P$ or $Q$ is true. They do not both need to be true. Applying that to this situation, you cannot use $Y\subseteq X$ to conclude that $Y\subset X.$ In particular, you cannot use $X\subseteq X$ to conclude that $X\subset X.$ – Will Orrick Jun 8 '14 at 2:51

$X$: "Hello set $Y$, is it so that any element of you is also an element of me?"

$Y$: "Yes."

$X$: "Well let us practicize a notation that expresses this fact: $Y\subseteq X$."

If $X$ would have asked the same question to himself then the answer would have been 'yes' too, right? So in the suggested notation: $X\subseteq X$.

Concerning 2):

$X$: "Hello set $\emptyset$, is it so that any element of you is also an element of me?"

$\emptyset$: "Well, I have no elements that are not. Even stronger, I have no elements at all. So again the answer is yes"

$X$: "Well let us practicize a notation that expresses this fact: $\emptyset\subseteq X$."

-
Awesome dialogue! – user59083 Jun 7 '14 at 16:07
@drhab, again with the voodoo. why is $X \subset X$ true? I'm not finding a good answer for this question. – CroCo Jun 8 '14 at 1:47
Read carefully; it's $X \subseteq X$, not $X \subset X$. – moshbear Jun 8 '14 at 9:07
If it is - in spite of all the answers on this question - not yet clear to you that $X\subseteq X$ then I cannot be of help anymore. The notation $A\subset B$ is quite often used to express that $A$ is a proper subset of $B$, wich means that $A\subseteq B$ and $A\neq B$. That means that $X\subset X$ is simply not true. But as I said: quite often, but not always. There are lots of authors using notation $\subset$ instead of $\subseteq$ and using notation $\subsetneq$ instead of $\subset$. In every book/script you should check on what side the author is on. – drhab Jun 8 '14 at 14:35

$(1)$ Lets consider something that may seem more familiar. The symbol "$\le$" means less than on or equal to, so if we see $a\le b$, one of the following criteria hold:

$(i)\,a\lt b$ ($a$ is strictly less than $b$), or

$(ii)\, a=b$.

Now it is clear that $a\le a$ because $(ii)$ holds.

Now we will work with subsets, $Y\subseteq X$ if:

$(i)$ every element of $Y$ is an element of $X$ (but $Y\ne X$), or

$(ii)$ $Y=X$

Now it is clear that $X\subseteq X$, because $(ii)$ holds.

$(2)$ the empty set $\varnothing$ is the set consisting of no elements. It is true that for any set $X$ we have $\varnothing\subseteq X$. So let us look at this constructively, as this a good way to see how things work.

How would one create a subset of $X$? One way would be to just remove elements of $X$, then what is left over would satisfy $(i)$, and thus be a subset.

Now remove all the elements of $X$ from $X$, what are you left with? A set consisting of nothing, I.e the eempty set, but still $(i)$ holds, so we see that $\varnothing\subseteq X$

-

The relation $\subseteq$ is just like the relation $\le$. It is not wrong to say that $x \le x$, i.e., "$x$ is less than or equal to $x$", although it's also true that $x = x$. The first is a weaker statement than the second, in that it conveys less information. But it's certainly not false in any way. Look at it another way: $\le$ [is less than or equal to] means the same thing as $\not >$ [is not greater than]. Is it true that $x$ is not greater than $x$? Yes. Then it is true that $x$ is less than or equal to $x$.

Similarly, $\subseteq$ [is a subset of] is equivalent to saying "does not contain elements not in". For example, $X \subseteq Y$ means "$X$ does contain any element that is not in $Y$". Is it true that $X$ does not contain any element not in $X$? Yes, it is always true. So $X \subseteq X$.

Now, let's apply this definition to the statement $\phi \subseteq X$. We know that $\phi = \{\}$, and let $X = \{1, 2, 3\}$, as in your example. Now, is it true that $\phi$ does not contain any element not in $X$? Yes! So $\phi \subseteq X$.

In more formal notation:

1. $X \subseteq Y \Leftrightarrow (\forall x \in X, x \in Y) \Leftrightarrow (\not\exists x \in X, x \notin Y)$
2. $(\forall x \in X, x \in X) \Rightarrow X \subseteq X$
3. $\not\exists x \in \phi \Rightarrow (\not\exists x \in \phi, x \notin X) \Rightarrow \phi \subseteq X$
-
why it is not wrong to say $x < x$? Let x = 4, saying 4 < 4 makes no sense at all. – CroCo Jun 8 '14 at 1:29
You seem to be rather confused. $4 \leq 4$ does not imply $4<4$. Obviously $3\leq 4$, but this doesn't imply $3=4$; you're making a similar mistake. – Malice Vidrine Jun 8 '14 at 2:46


text:
# Prove Equivalency to Darboux Integrability

I've been working through a book on Introductory Real Analysis and I've been stumped by part of this problem.

Suppose we consider a partition that splits $$[a,b]$$ into $$n$$ partitions each with length $$\frac{b-a}{n}$$. Show that a function $$f:[a,b]\rightarrow\mathbb R$$ is Darboux integrable on just these partitions iff it is Darboux integrable over all partitions.

The if direction is very trivial, that one isn't too tricky.

However, the only if direction has me stumped. How can I show that integrability over this type of partition implies integrability over any partitions. I think I can show that it gives integrability over rational partitions (not sure if that's a formal term, basically a partition where all interval lengths are rational). However, I'm having trouble extending it to all partitions in general.

• The supremum over a set is always greater than or equal to the supremum over a subset, etc.
– RRL
Nov 7, 2020 at 7:41

Let $$\mathcal{P}$$ ($$\mathcal{P}_U$$) be the collection of all partitions (uniform partitions) of $$[a,b]$$.

For a bounded function $$f$$, we have $$L(P,f) \leqslant U(Q,f)$$ for lower and upper Darboux sums corresponding to arbitrary partitions $$P$$ and $$Q$$. It follows that

$$\sup_{P \in \mathcal{P}}L(P,f) \leqslant \inf_{P \in \mathcal{P}}U(P,f), \quad \sup_{P \in \mathcal{P}_U}L(P,f) \leqslant \inf_{P \in \mathcal{P}_U}U(P,f)$$

Since $$\mathcal{P}_U \subset \mathcal{P}$$ we have

$$\{U(P,f) \,|\, P \in \mathcal{P}_U\} \subset \{U(P,f) \,|\, P \in \mathcal{P}\}, \quad \{L(P,f) \,|\, P \in \mathcal{P}_U\} \subset \{L(P,f) \,|\, P \in \mathcal{P}\}$$

Hence,

$$\tag{*}\sup_{P \in \mathcal{P}_U}L(P,f) \leqslant \sup_{P \in \mathcal{P}}L(P,f) \leqslant \inf_{P \in \mathcal{P}}U(P,f) \leqslant \inf_{P \in \mathcal{P}_U}U(P,f)$$

Darboux integrability with respect to uniform partitions means that

$$\sup_{P \in \mathcal{P}_U}L(P,f) =\inf_{P \in \mathcal{P}_U}U(P,f),$$

which, in view of (*), implies that $$f$$ is Darboux integrable with respect to all partitions since

$$0 \leqslant \inf_{P \in \mathcal{P}}U(P,f)- \sup_{P \in \mathcal{P}}L(P,f) \leqslant \inf_{P \in \mathcal{P}_U}U(P,f)- \sup_{P \in \mathcal{P}_U}L(P,f) = 0,$$ and $$\inf_{P \in \mathcal{P}}U(P,f)= \sup_{P \in \mathcal{P}}L(P,f)$$

• Ok, this makes sense, but I think I made a big error in my proof of the opposite direction then. Would you be able to give a hint for that direction? Nov 7, 2020 at 8:26
• @AyushTibrewal: Yes -- that direction is not trivial. First, there is an equivalent condition for Darboux integrability. We have $f$ Darboux integrable if for any $\epsilon>0$ there is a partition $P_\epsilon$ such that $U(P_\epsilon,f) - L(P_\epsilon,f) < \epsilon$. So assuming that the Darboux integral exists with respect to all partitions we want to show that there is always a uniform partition $P_U$ such that $U(P_U,f) - L(P_U,f) < \epsilon$.
– RRL
Nov 7, 2020 at 8:53
• One way to proceed is to show that an equivalent condition is for any $\epsilon > 0$ there exists $\delta > 0$ such that for all partitions $P$ with mesh (length of longest subinterval) less than $\delta$ we have $U(P,f) - L(P,f)< \epsilon$. It is not an easy proof. I indicated how to do it here.
– RRL
Nov 7, 2020 at 8:57
• With that result, you can always find a uniform partition with mesh less than $\delta$ by taking $n$ sufficiently large. Let me think if there is an easier way.
– RRL
Nov 7, 2020 at 8:59
• Ok, I think I got a proof for the if direction through dyadic partitions since dyadics are a subset of the uniform partitions. I think that works since I've already proven that dyadic integrability is equivalent to Riemann and thus Darboux. From there, its similar where if a subset of the uniform partitions (dyadics of course) have defined integrability, so does the larger set of all uniform partitions. Nov 7, 2020 at 18:50


text:
# Study of W boson production in PbPb and pp collisions at sqrt(s[NN]) = 2.76 TeV

Abstract : A measurement is presented of W-boson production in PbPb collisions carried out at a nucleon-nucleon (NN) centre-of-mass energy sqrt(s[NN]) of 2.76 TeV at the LHC using the CMS detector. In data corresponding to an integrated luminosity of 7.3 inverse microbarns, the number of W to mu mu-neutrino decays is extracted in the region of muon pseudorapidity abs(eta[mu])<2.1 and transverse momentum pt[mu]>25 GeV. Yields of muons found per unit of pseudorapidity correspond to (159 +/- 10 (stat.) +/- 12 (syst.)) 10E-8 W(plus) and (154 +/- 10 (stat.) +/- 12 (syst.)) 10E-8 W(minus) bosons per minimum-bias PbPb collision. The dependence of W production on the centrality of PbPb collisions is consistent with a scaling of the yield by the number of incoherent NN collisions. The yield of W bosons is also studied in a sample of pp interactions at sqrt(s)= 2.76 TeV corresponding to an integrated luminosity of 231 inverse nanobarns. The individual W(plus) and W(minus) yields in PbPb and pp collisions are found to agree, once the neutron and proton content in Pb nuclei is taken into account. Likewise, the difference observed in the dependence of the positive and negative muon production on pseudorapidity is consistent with next-to-leading order perturbative QCD calculations.
Document type :
Journal articles
Domain :

http://hal.in2p3.fr/in2p3-00702326
Contributor : Sylvie Flores Connect in order to contact the contributor
Submitted on : Wednesday, May 30, 2012 - 7:31:01 AM
Last modification on : Monday, December 13, 2021 - 9:15:04 AM

### Citation

S. Chatrchyan, M. Besancon, S. Choudhury, M. Dejardin, D. Denegri, et al.. Study of W boson production in PbPb and pp collisions at sqrt(s[NN]) = 2.76 TeV. Physics Letters B, Elsevier, 2012, 715, pp.66-87. ⟨10.1016/j.physletb.2012.07.025⟩. ⟨in2p3-00702326⟩

### Metrics

Les métriques sont temporairement indisponibles


text:
Don't Miss

# All posts tagged "pi day"

• Plus Magazine Monthly Column – March 2017

Plus http://plus.maths.org is a free online magazine about mathematics aimed at a general audience. It is part of the Millennium Mathematics Project, based at the University of Cambridge and our aim is to open a door onto the...

• Posted March 30, 2017
• 0
• Pi day 2017: fun and facts

This article was partially published on DocMadhattan As you know, the $\pi$ is defined as the ratio of the circumference to its diameter. This number, which is transcendental, was, apparently, known since ancient times. There are, in...

• Posted March 14, 2017
• 0
this site uses the awesome footnotes Plugin


text:
# Javascript code performance optimization – from troubleshooting to processing

Time：2019-12-2

Recently, we are optimizing the performance of our console. This time, we record the performance troubleshooting and optimization of code execution (optimization of DOM operation is not included in pure JS). Other optimization points will be shared later.

## Performance troubleshooting and collection

First, we need to find out the points that need to be optimized. In this case, we can use Chrome’s devtool to find out the performance problems in the website.

It is better to collect information in stealth mode to avoid the influence of some plug-ins.

### Performance

The first way is to collect information with the help of performance panel. Expand the main panel to see the information of code running. However, there are many contents in the performance panel, including rendering, network, memory and other information, so the visual interference is serious. Although it is very powerful, it is not recommended for pure JS performance troubleshooting. Today, I mainly introduce another way.

### JavaScript Profiler

Another way is to use JavaScript profiler, which is hidden by default. You need to open it in more buttons (three point buttons) = > more tools in the top right corner of devtool.

You can see that the JavaScript profiler panel is much simpler than the performance panel. The top row of buttons on the left can collect, delete and garbage collect (it may be used to enforce GC, which is not sure). You can collect multiple profilers for comparison.

On the right is the display area of profiler. You can switch the display modes on the top, including chart, heavy and tree. Here, chart is recommended, which is the most intuitive and understandable.

Chart is on the top of chart panel, CPU utilization is on the vertical axis, and peak point is the key area for troubleshooting. Below is the code execution time fragment information. A long time fragment will cause obvious jam in the page, which needs to be checked.

In the chart panel, scroll up and down to zoom in and out the graph, scroll left and right to scroll the timeline, or circle and drag the mouse in the graph. CMD + F can be searched, which is more convenient when you want to find the corresponding code performance.

Through the JavaScript profiler panel, you can find out the code with abnormal performance.

For example, n.bootstrap in the figure has an execution time of 354.3ms, which will obviously cause a more serious jam.

You can also go down the time fragment to find out which step takes longer. From the above, you can see that L. initstate takes 173ms, and the following are several foreach. Obviously, the cycle performance consumption here is relatively large. Click the time fragment to jump to the corresponding code on the source panel, which is very convenient for troubleshooting.

With the help of JavaScript profiler, we can sort out all the codes with long time and possible performance problems and put them in the agent list for further investigation.

### console.time

With Profiler, it is very convenient to sort out the problem code, but it is a bit troublesome in the actual tuning process, because each debugging needs to perform a collection. After collecting, we still need to find the current debugging point, which will waste a lot of time. So in the actual tuning process, we will choose other ways, such as calculating the time stamp difference and then log out, but its There is a more convenient way – console. Time.

const doSomething = () => {
return new Array((Math.random() * 100000) | 0).fill(null).map((v, i) => {
return i * i;
});
};
// start a time log
console.time('time log name');
doSomething();
// log time
console.timeLog('time log name', 1);
doSomething();
// log time
console.timeLog('time log name', 2);
doSomething();
// log time and end timer
console.timeEnd('time log name', 'end');

At present, most browsers support console.time, which can easily print out the execution time of a piece of code.

• Console.time receives a parameter ID and opens a timer, which can then be used to execute timelog and timeend
• The timelog receives 1-N parameters. The first one is the timer ID, followed by optional parameters. After execution, the time difference of the current timer and other optional parameters passed in will be printed out
• Timeend is similar to timelog, except that it does not accept extra optional parameters and will close the timer after execution
• Multiple timers with the same identity cannot be enabled at the same time
• After a timer ends, you can open a timer with the same name again

Through console.time, we can intuitively see the execution time of a piece of code. After each change, the page refreshes to see the log, so as to see the impact of the change.

## Sorting and optimization of performance problems

With the help of JavaScript profiler, multiple performance optimization points are found from the console. (the following time is the data when debugging locally and opening devtool, which is higher than the actual situation.)

Name position Single time consuming Number of first execution Switching execution times
initState route.extend.js:148 200ms – 400ms 1 0
initRegionHash s_region.js:217 50ms – 110ms 1 0
initRegion s_region.js:105QuickMenuWrapper/index.jsx:72 70ms – 200ms 1 0
getProducts s_globalAction.js:73 40ms – 80ms 1 2
getNav s_userinfo:58 40ms – 200ms 2 0
extendProductTrans s_translateLoader.js:114 40ms – 120ms 1 1
filterTopNavShow EditPanel.jsx:224 0 – 20ms 7 3

According to the listed troubleshooting points, specifically eliminate performance problems. Here are some typical questions.

var localeFilesHandle = function (files) {
var result = [];
var reg = /[^\/\\:\*\"\<\>\|\?\.]+(?=\.json)/;
_.each(files, function (file, i) {
// some code
});
return result;
};

var loadFilesHandle = function (files) {
var result = [];
var reg = /[^\/\\:\*\"\<\>\|\?\.]+(?=\.json)/;
_.each(files, function (file, i) {
// some code
});
return result;
};

self.initState = function (data, common) {
console.time('initState');
// some code
_.each(filterDatas, function (state, name) {
var route = _.extend({}, common, state);
var localeFiles = localeFilesHandle(route['files']);

route['localeFiles'] = localeFiles;
routes[name] = route;
$stateProvider.state(name, route); }); // some code console.timeEnd('initState'); }; In initstate, filterdata is a route map with nearly 1000 keys. To initialize, you need to register the route information in the UI router. There is no way to omit$stateprovider.state, but the two files can be delayed. When pulling files, you need to get the file list.

self.initState = function (data, common) {
console.time('initState');
// some code
_.each(filterDatas, function (state, name) {
var route = _.extend({}, common, state);
routes[name] = route;
$stateProvider.state(name, route); }); // some code console.timeEnd('initState'); }; // when load files !toState.loadfiles && (toState.loadfiles = _.union( toState['common_files'] || [],$UStateExtend.loadFilesHandle(toState['files'])
));
!toState.localeFiles && (toState.localeFiles = $UStateExtend.localeFilesHandle(toState['files'])); After reducing the tasks in the iteration, the initstate speed increased by 30% – 40%. ### Clarify logic var bitMaps = { // map info }; function getUserRights(bits,key){ var map = {}; _.each(bitMaps,function(val,key){ map[key.toUpperCase ()] = val; }); return (map && map[(key||'').toUpperCase ()] != null) ? !!(+bits.charAt(map[(key||'').toUpperCase ()])) : false; } In getuserrights, you can see that every time you traverse bitmaps, there will be no change in bitmaps itself, so you only need to traverse once during initialization, or cache after the first traverse. var _bitMaps = { // map info }; var bitMaps = {}; _.each(_bitMaps, function(value, key) { bitMaps[key.toUpperCase()] = value; }); function getUserRights(bits, key) { key = (key || '').toUpperCase(); return bitMaps[key] != null ? !!+bits.charAt(bitMaps[key]) : false; } After the above changes, the efficiency of getuserrights has increased by 90 +%, and getuserrights has been called many times in many of the above performance problems, so this change can bring significant performance improvement. ### Make good use of bit operation var buildRegionBitMaps = function(bit,rBit){ var result; if( !bit || !rBit){ return ''; } var zoneBit = (bit + '').split(''); var regionBit = (rBit + '').split(''); var forList = zoneBit.length > regionBit.length ? zoneBit : regionBit; var diffList = zoneBit.length > regionBit.length ? regionBit : zoneBit; var resultList = []; _.each(forList,function(v,i){ resultList.push(parseInt(v) || parseInt(diffList[i] || 0)); }); result = resultList.join(''); return result; }; var initRegionsHash = function(data){ // some code _.each(data,function(o){ if(!regionsHash[o['Region']]){ regionsHash[o['Region']] = []; regionsHash['regionBits'][o['Region']] = o['BitMaps']; regionsList.push(o['Region']); } regionsHash['regionBits'][o['Region']] = buildRegionBitMaps(o['BitMaps'],regionsHash['regionBits'][o['Region']]); regionsHash[o['Region']].push(o); }); // some code }; Buildregionbitmaps is to combine two 512 bit long permission bit binary strings (the length is not fixed according to the current code) to calculate the actual permission. The current code breaks the binary string into an array, and then iterates to calculate the permission of each bit, with low efficiency. Buildregionbitmaps will be called multiple times in initregionshash, which will enlarge the performance problem here. Here we can use bit operation to calculate permissions conveniently, which is much more efficient than array traversal. var buildRegionBitMaps = function(bit,rBit){ var result = ''; if (!bit || !rBit) { return ''; } var lBit, sBit, sl; if (bit.length > rBit.length) { lBit = bit; sBit = rBit; } else { lBit = rBit; sBit = bit; } sl = sBit.length; var i = 0; var s = 30; for (; i < sl; ) { var n = i + s; result += (parseInt('1' + lBit.substring(i, n), 2) | parseInt('1' + sBit.substring(i, (i = n)), 2)).toString(2).substring(1); } return result + lBit.slice(sl); }; With the above changes, initregionhash’s running time is optimized to 2ms – 8ms, increasing by 90 +%. Note that the bit operation in JavaScript is based on 32 bits, and more than 32 bits overflow, so the above is disassembled into 30 bit strings for merging. ### Reduce repetitive tasks function () { currentTrans = {}; angular.forEach(products, function (product, index) { setLoaded(product['name'],options.key,true); currentTrans = extendProduct(product['name'],options.key, CNlan); }); currentTrans = extendProduct(Loader.cname||'common',options.key, CNlan); if($rootScope.reviseTrans){
currentTrans = Loader.changeTrans($rootScope.reviseNoticeSet,currentTrans); } deferred.resolve(currentTrans[options.key]); } The above code is used to merge product languages. Products is the product name corresponding to the route, and there will be duplicates. The common language is large, and there are more than 1W keys, so the merging time is very heavy. function () { console.time('extendTrans'); currentTrans = {}; var productNameList = _.union(_.map(products, product => product.name)); var cname = Loader.cname || 'common'; angular.forEach(productNameList, function(productName, index) { setLoaded(productName, options.key, true); if (productName === cname || productName === 'common') return; extendProduct(productName, options.key, CNlan); }); extendProduct('common', options.key, CNlan); cname !== 'common' && extendProduct(cname, options.key, CNlan); if ($rootScope.reviseTrans) {
currentTrans = Loader.changeTrans($rootScope.reviseNoticeSet, currentTrans); } deferred.resolve(currentTrans[options.key]); console.timeEnd('extendTrans'); } Here, the product name in the product is de duplicated to reduce the number of merges, and then the language merges corresponding to common and CNAME are removed from the traversal. Finally, the merges are done to reduce the number of merges and reduce the amount of data in the previous merges. After the change, extendtrans speed increased by 70 +%. ### Quit as early as possible user.getNav = function(){ var result = []; if ( _.isEmpty ($rootScope.USER ) ) {
return result;
}
_.each ( modules , function ( list ) {
var show = true;
if ( list.isAdmin === true ) {
show = $rootScope.USER.Admin == 1; } var authBitKey = list.bitKey ? regionService.getUserRights ( list.bitKey.toUpperCase () ) : show; var item = _.extend ( {} , list , { show : show, authBitKey : authBitKey } ); if ( item.isUserNav === true ) { result.push ( item ) } } ); return result; }; Modules in getNav is routing. As mentioned above, routing is more than a thousand, and getUseRights is called in the traversal here, resulting in serious performance loss. Another serious problem is that most of the data will be removed by isUserNav screen. user.getNav = function(){ var result = []; if ( _.isEmpty ($rootScope.USER ) ) {
return result;
}
console.time(getNav);

_.each ( modules , function ( list ) {
if(list.isUserNav !== true) return;

var show = true;
if ( list.isAdmin === true ) {
show = $rootScope.USER.Admin == 1; } var authBitKey = list.bitKey ? regionService.getUserRights ( list.bitKey.toUpperCase () ) : show; var item = _.extend ( {} , list , { show : show, authBitKey : authBitKey } ); result.push ( item ); } ); console.timeEnd(getNav); return result; }; The speed of getnav is increased by 99% by advancing judgment, ending meaningless code as early as possible, and optimizing getuserrights. ### Make good use of lazy renderMenuList = () => { const { translateLoadingSuccess, topMenu } = this.props; if (!translateLoadingSuccess) { return null; } return topMenu .filter(item => { const filterTopNavShow = this.$filter('filterTopNavShow')(item);
return filterTopNavShow > 0;
})
.map((item = [], i) => {
const title = INDEX_TOP_${(item[0] || {}).type}.toUpperCase(); return (

 {formatMessage({ id: title })}

 <Row gutter={12}>{this.renderMenuProdList(item)}</Row>

 ); }); }; The above code is in a menu editing panel of the console. This panel will only appear if the user clicks edit. However, the existing logic causes this data to be frequent. Once entering the page, filter top navshow will be executed 7 times, and it will be re rendered. renderMenuList = () => { const { translateLoadingSuccess, topMenu, mode } = this.props; if (!translateLoadingSuccess) { return null; } if (mode !== 'edit' && this._lazyRender) return null; this._lazyRender = false; const menuList = topMenu .filter(item => { const filterTopNavShow = this.$filter('filterTopNavShow')(item);
return filterTopNavShow > 0;
})
.map((item = [], i) => {
const title = INDEX_TOP_\${(item[0] || {}).type}.toUpperCase();
return (

{formatMessage({ id: title })}

);
});
};

In this case, you can simply add a “lazy render” field to delay rendering and calculation until the first time you open it, avoiding unnecessary operations during page initialization.

## Achievements

First look at the time comparison before and after the transformation

Name Single time consuming Optimization effect
initState 200ms – 400ms 120ms – 300ms, 30% – 40% less
initRegionHash 50ms – 110ms 2ms – 8ms, 90% less
getMenu 0 – 40ms 0ms – 8ms, 80% less
initRegion 70ms – 200ms 3MS – 10ms, 90% less
getProducts 40ms – 80ms 3MS – 10ms, 90% less
getNav 40ms – 200ms 0ms – 2ms, 99% less
extendProductTrans 40ms – 120ms 70% reduction in 10ms – 40ms
filterStorageMenu 4ms – 10ms 0ms – 2ms, 80% less
filterTopNavShow 0 – 20ms First load is no longer executed, expand execution

The comparison is still obvious, most of the time is controlled within 10ms.

You can take a look at the profiler before and after the transformation.

Before transformation:

After transformation:

After optimization, we can see that a lot of peaks have disappeared (the rest are some optimization points that are not easy to do at present). When entering the page and switching products, we can also obviously feel the difference.

## summary

From the above optimization code, we can see that most of the performance problems are caused by loops. A small performance problem will also have a serious impact after multiple loops. Therefore, in normal code, many things still need to be paid attention to as much as possible. For example, the code that can end as soon as possible will end as soon as possible, and unnecessary operations will be omitted. It is necessary to do caching to ensure that With good programming habits, you can make your code run at a good speed even in unknown situations.

With the help of JavaScript profiler and console.time, performance troubleshooting and optimization can be very simple, and it is easy to find the problem point and make optimization scheme for the problem.

## How to search files or directories under CentOS

Search for files or directories: The search for files is great! Because we often need to know where that file is, let’s talk about how to search it! There are also quite excellent ones under Linux Search system! Usually find is not very common! Because the speed is slow, but also very hard disk! Usually […]