text:
# Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

69 messages
1234
Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

 Henning Thielemann <[hidden email]> writes: > On Thu, 23 Mar 2017, Fumiaki Kinoshita wrote: > >> It's surprising that they are missing (forgive me, I'm not here to make people grumpy). > > I am not surprised because it was discussed at length a year > before. I still think all these instances on pairs, triples > and other tuples are more dangerous than helpful. It is so > easy and much more expressive to define custom data types > for your particular application. Actually, I am still > actively using only GHC up to GHC-7.8.4, because starting > with GHC-7.10.3 the slogan "if it can be compiled, it is > certainly correct" cannot be reasonably claimed anymore > (length(a,b)==1, maximum(2,1)==1 etc. are just not sane). I wholeheartedly agree. -1 from me on all such proposals. I’m greatly dismayed at the rate at which arguments for convenience are winning over arguments for correctness. -- Jón Fairbairn                                 [hidden email] _______________________________________________ Libraries mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

 In reply to this post by Henning Thielemann 2017-03-30 23:49 GMT+02:00 Henning Thielemann :The community was and is pretty divided, I think. My suggested compromise is to get compiler warnings if you use certain instances (by accident).I fully agree with Henning here, and I think we will never ever reach a consensus about these instances. This is caused by the fact that there are 2 contradicting goals here, and which one is more important is a totally personal opinion, not something which can be proved or shown otherwise:   * Type safety, a.k.a. "if it compiles, it works": We definitely lose on this side with the given instances, and we lose even more when there are more instances.   * Consistency: If there is a unique way to define an instance, let's do it, and do it for *all* such types. Just like type safety, this is a valuable goal, and one which is reached by Haskell to very large amount.Personally, I would very much prefer nuking the Functor/... instances for pairs, the resulting length/maximum/... semantics are total nonsense, even if they are consistent. Let's not forget the "principle of least surprise", a very worthy goal, which is heavily damaged by these instances. But the pair instances are already there, and removing them would damage the Haskell ecosystem quite a bit. So what can we do?   a) Actually nuke the pair instances, accepting the resulting damage and "holes".   b) Keep the pair instances. But then we should really add the remaining tuple instances, too (consistency!), *and* we should add a compiler flag/pragma for people wanting to avoid them.So a reluctant +1 for b), but only *after* we have a flag/pragma. A strong -1 for adding the instances before such a flag/pragma.Next battle: What will be the default for the flag/pragma? >:-) _______________________________________________ Libraries mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

 On Fri, 31 Mar 2017, Sven Panne wrote: > So a reluctant +1 for b), but only *after* we have a flag/pragma. A > strong -1 for adding the instances before such a flag/pragma. Generally we should first have a way to limit damage before adding more type unsafety. Currently re-adding safety belts lags years behind reduction of type safety. Btw. the ticket is https://ghc.haskell.org/trac/ghc/ticket/11796> Next battle: What will be the default for the flag/pragma? >:-) I'd prefer that this warning is enabled by default. Next best solution is to integrate the warning in Wall. There are people who even find that too annoying. Using the new selective conversion of warnings to errors we can also get back type errors:     https://ghc.haskell.org/trac/ghc/ticket/11219_______________________________________________ Libraries mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

 In reply to this post by Bryan Richter-2 On Thu, Mar 30, 2017 at 10:47 PM Bryan Richter <[hidden email]> wrote:I just don't know why pairs ever got to Functor. I fear this was an ancient decision... no?If you're curious, this happened over 10 years ago: _______________________________________________ Libraries mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

 On Fri, 31 Mar 2017, Herbert Valerio Riedel wrote: > On Thu, Mar 30, 2017 at 10:47 PM Bryan Richter <[hidden email]> wrote: >       I just don't know why pairs ever got to Functor. I fear this was an ancient decision... no? > > > If you're curious, this happened over 10 years ago: > > http://git.haskell.org/ghc.git/commitdiff/209bf03ac7949c9bcf677561a2b1360b158e3b22Interesting. The Functor instance for pairs was added together with the Functor instance for functions. But the Monad instance for pairs came later, right? _______________________________________________ Libraries mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

 In reply to this post by Sven Panne-2 A contrary, consistent position would mean there is a belief in all of the following: * the length of any value of the type ((,) a) is not 1 * 0 is not an integer I have never seen this position, which would be a consistent, third position. These leaves two remaining positions; one of consistency and one of inconsistency. Restated: * the length semantics of ((,) a) are total nonsense. * that 0 is an integer, is total nonsense. I could totally respect this position. It would make a lot more sense. It would be consistent. It would be defendable. I would admire it. On 31/03/17 19:23, Sven Panne wrote: 2017-03-30 23:49 GMT+02:00 Henning Thielemann : The community was and is pretty divided, I think. My suggested compromise is to get compiler warnings if you use certain instances (by accident). I fully agree with Henning here, and I think we will never ever reach a consensus about these instances. This is caused by the fact that there are 2 contradicting goals here, and which one is more important is a totally personal opinion, not something which can be proved or shown otherwise:    * Type safety, a.k.a. "if it compiles, it works": We definitely lose on this side with the given instances, and we lose even more when there are more instances.    * Consistency: If there is a unique way to define an instance, let's do it, and do it for *all* such types. Just like type safety, this is a valuable goal, and one which is reached by Haskell to very large amount. Personally, I would very much prefer nuking the Functor/... instances for pairs, the resulting length/maximum/... semantics are total nonsense, even if they are consistent. Let's not forget the "principle of least surprise", a very worthy goal, which is heavily damaged by these instances. But the pair instances are already there, and removing them would damage the Haskell ecosystem quite a bit. So what can we do?    a) Actually nuke the pair instances, accepting the resulting damage and "holes".    b) Keep the pair instances. But then we should really add the remaining tuple instances, too (consistency!), *and* we should add a compiler flag/pragma for people wanting to avoid them. So a reluctant +1 for b), but only *after* we have a flag/pragma. A strong -1 for adding the instances before such a flag/pragma. Next battle: What will be the default for the flag/pragma? >:-) _______________________________________________ Libraries mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries  _______________________________________________ Libraries mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries signature.asc (499 bytes) Download Attachment
Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

 In reply to this post by Henning Thielemann The Monad instance for pairs came later mostly because there was a big dependency inversion / orphan problem with getting at Monoid for it, but yes.-EdwardOn Fri, Mar 31, 2017 at 1:24 PM, Henning Thielemann wrote: On Fri, 31 Mar 2017, Herbert Valerio Riedel wrote: On Thu, Mar 30, 2017 at 10:47 PM Bryan Richter <[hidden email]> wrote:       I just don't know why pairs ever got to Functor. I fear this was an ancient decision... no? If you're curious, this happened over 10 years ago: http://git.haskell.org/ghc.git/commitdiff/209bf03ac7949c9bcf677561a2b1360b158e3b22 Interesting. The Functor instance for pairs was added together with the Functor instance for functions. But the Monad instance for pairs came later, right? _______________________________________________ Libraries mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries _______________________________________________ Libraries mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

 On 01/04/17 17:24, Andreas Abel wrote: > > The length of ((,) a) is exactly one. Anything else is ridiculous. > > Now we are even talking of the length of a function.  Can it get more > absurd?! No. It is perfectly reasonable. Go and "ask the mathematics department" or whatever criteria it will take for (the collective) you to understand that. > Just make a field experiment.  Go to the mathematics department and > ask people what is the length of (1, 1), the length of (1, 1, 1).  An > then count the number of people that respond "1" to both of these > questions. And weight it against the people that say something else. We already agree on the result. Thanks again for pointing out, that I am pointing to the mistake that is repeatedly made. I will just keep pointing to it. Just keep that mistake out of my code, thanks. _______________________________________________ Libraries mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries signature.asc (499 bytes) Download Attachment
Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

 In reply to this post by Fumiaki Kinoshita Since "God made the integers…” perhaps the question of whether 0 is an integer is best left to theologians. On the other hand, in set theory a tuple is defined as a set containing two elements and in category theory, a product is a limit of a discrete category with two objects. Of course you can treat a tuple as a decorated container containing one element but I doubt many mathematicians think of them this way. Before anyone points out that I shouldn’t think of types as sets, the same applies to \omega-complete partial orders. Perhaps I had better be explicit and say please no aka -1. > The length of ((,) a) is exactly one. Anything else is ridiculous. Try > arguing against that, instead of a position that does not exist ("length > of tuples"). I wrote this instance some number of years ago (about 11), > and have used it on teams all over the place. Not once was there an > issue that was not quickly corrected, and thereby achieving the > practical benefits that come with, by providing a better understanding. > That understanding is above. The length of ((,) a) is exactly one. Say > it with me. > > > On 01/04/17 10:08, Francesco Ariis wrote: >> On Sat, Apr 01, 2017 at 07:59:00AM +1000, Tony Morris wrote: >>> A contrary, consistent position would mean there is a belief in all of >>> the following: >>> >>> * the length of any value of the type ((,) a) is not 1 >>> * 0 is not an integer Dominic Steinitz [hidden email] http://idontgetoutmuch.wordpress.com_______________________________________________ Libraries mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

 On Sat, 1 Apr 2017, Jakub Daniel wrote: > And I imagine nobody would argue that doesn't make sense. I kind of see > why people want better name than length but I see no really good > argument why the instance is bad. There are no doubt other generalised > notions. It also was an unfair question to ask what mathematicians would > think the length of (1,1) was. Because the question is not asked in > context where we ask about length for the type (a,-) not (-,-). And for me the context (a,-) is artificial. _______________________________________________ Libraries mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
Open this post in threaded view
|

## Re: Functor, Applicative, Monad, Foldable, Traversable instances for (, , ) a b

 In reply to this post by Andreas Abel-2 On Sat, 1 Apr 2017, Andreas Abel wrote: > In the end, I should be grateful for the FTP.  It will provide amusement > for years. > > Q: What is the length of pi? > A: Dunno, infinity? > Q: And what is the length of just pi? > > GHCi, version 7.10.3: http://www.haskell.org/ghc/  :? for help > Prelude> length (Just pi) > 1 > > ROFL. I have to admit that I even accept this more than length on pairs. I used to use Maybe for lists with length 0 or 1. _______________________________________________ Libraries mailing list [hidden email] http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries


text:
# Finding maximum and minimum values of a harmonic function $f(z)= \ln \left|z \right|$ on $1 \leqslant \left|z \right| \leqslant 2$

$(i)$. Locate the maximum and minimum values of $f(z)=\ln \left|z \right| = \frac{1}{2} \ln(x^2+y^2)$ on $\overline{\Omega} = \{z \in \mathbb{R}^2: 1 \leqslant \left|z \right| \leqslant 2\}$. $(ii)$. Do the extreme values occur on the boundary?

My attempt: $(i)$. I first tried parameterizing the annulus $\overline{\Omega}$. Let $C_1$ denote the circle boundary of $\left|z \right|=2$ and $C_2$ the circle boundary of $\left|z \right|=1$. Parameterize $C_1$ counterclockwise by $x:[0,2 \pi] \to C_1$, $t \mapsto (2 \cos t, 2 \sin t)$ and parameterize $C_2$ counterclockwise by $y:[0, 2 \pi] \to C_2$, $t \mapsto (\cos t, \sin t)$.

I wanted to use the parameterized annulus to turn $f(z)$ into a one-variable function and then just take the derivatives $f^{\prime}(x(t))$, $f^{\prime}(y(t))$ and set them equal to $0$ (to find the extreme values), but I don't think they give me much information, because $f(x(t))= \frac{1}{2} \ln(2)$ and $f(y(t))=\frac{1}{2} \ln(1)$ are both constants and thus equal $0$ after differentiating?

Question $1$: Can we figure out the maximum and minimum values using this method, or do we need to try something else? (since parameterizations of circles in a plane involve cosines and sines but our function has the $x^2+y^2$ in it)

Question $2$: Is this a correct parameterization of the annulus?

My work for $(ii)$: We are given a property in the book, called the Weak Maximum Principle, which states that If $\Omega$ is a bounded domain, with $u$ continuous on $\overline{\Omega} = \Omega \cup \partial \Omega$ (union of domain and its boundary) and harmonic in $\Omega$, then $u$ is either constant on $\overline{\Omega}$ or assumes its maximum and minimum values on the boundary.

Question $3$: The function $f(z)$ is harmonic in the interior of the annulus, but how would we use this information to show that it is continuous on the boundary $\partial \Omega$ of the annulus? We need to show that it is continuous on $\Omega \cup \partial \Omega$, but I think I only know how to show that it is continuous on $\Omega$:

I know that harmonic implies that $f(z)$ is continuous on the interior, since $f(z) \in \mathcal{C}^2(\Omega) \subseteq \mathcal{C}(\Omega)$, but I don't know how to show it is also continuous on the boundary. Clearly the annulus is bounded, so using the Weak Maximum Principle, I'm pretty sure that that extrema occur on the boundary $\partial \Omega$.

• Is this a trick question? $r \mapsto \log r$ is monotone... – Unit Apr 13 '16 at 2:26
• The logarithm function for real argument increases monotonically. Therefore, its minimum is at $x^2+y^2=1$ and its maximum is at $x^2+y^2=2$. – Mark Viola Apr 13 '16 at 2:29
• @Dr. MV I can see intuitively why this is the case, but how would we show that monotonically increasing implies that maximum and minimum occur on the boundary circles? – user167857 Apr 13 '16 at 3:35
• Well, it is a real function of $x^2+y^2$. When does $x^2+y^2$ attain its maximum and minimum values inside the annulus? – Mark Viola Apr 13 '16 at 3:37
• @Dr. MV I think I see now, thank you. – user167857 Apr 13 '16 at 4:33

format: plain


text:
# Meeting Details

For more information about this meeting, contact Svetlana Katok, Anatole Katok.

Title: Gromov hyperbolic spaces and the sharp isoperimetric constant Center for Dynamics and Geometry Seminars Stefan Wenger, Courant The classical isoperimetric inequality asserts that the area A enclosed by a closed curve of length L in the Euclidean plane satisfies 4\pi A \leq L^2 with equality exactly for circles. In this talk we will discuss the following theorem: Let X be a complete geodesic metric space. If there exists an epsilon > 0 such that every sufficiently long closed curve in X (of length L, say) bounds a 2-chain whose area A satisfies 4\pi A \leq (1-epsilon)L^2 then X is Gromov hyperbolic. This result is sharp, new even for Riemannian manifolds, and strengthens theorems of Gromov, Papasoglu, Drutu, and Bowditch. Furthermore, a similarly optimal result can be obtained for the filling radius inequality.

### Room Reservation Information

Room Number: MB106 03 / 26 / 2008 03:35pm - 04:35pm


text:
# Re: Can LyX repeat custom styles (related to word's "style for next paragraph")?

Am Sonntag 19 Juli 2015, 02:34:26 schrieb C.  Fuhrman:
> I posted quite a detailed question on the tex stack exchange here:
> http://tex.stackexchange.com/q/255936/17868
>
> The short version is that I'm using LyX 2.1.3 on Windows with the
> Exam.cls and a layout file I've customized.
>
> In the context of a \begin{questions} environment (defined in a Flex
> Inset), I'd like to know if it's possible for LyX to automatically
> repeat a certain style within. For example, it's intuitive within this
> environment to repeat the Question style (which is a LatexType Command
> that maps to \question[]{}). LyX always gives me 'Plain Layout' within
> the inset to start. When I set it to Question, type the question and
> press return, I get again a 'Plain Layout'. I would like Question to be
> the "style for next paragraph" within this inset.
>
> I can *almost* do this with an LatexType Item_Environment which gives me
> Enumerated (\item) styles. However, I'd like to state which LyX style to
> repeat within my custom environment.

You can use the ItemCommand layout option for this task:

Style Questions
Margin           Static
LatexType        Item_Environment
LatexName        questions
ItemCommand      question
Argument item:1


text:
# Tag Info

10

The reason is that with the exception of linear problems, if you do a Fourier (or other) decomposition in time, you end up with a significant number of problems that are coupled globally in time. In other words, you have to solve lots of problems on the entire time interval concurrently. That will typically bust your computational or memory budget. The ...

10

I would not insist on demanding a geometrical meaning from Galerkin methods in general. There is a connection, but it becomes less meaningful as you extend it further and further. (In a sense, it would be better to call Galerkin methods "generalized projection methods".) To really understand the connection between collocation and Galerkin methods requires ...

8

I see several issues: The DFT computed with fft puts the zero mode at the beginning of the array, and if you want to compute the derivative, it is necessary to apply fftshift/ifftshift to the array N to make sure the derivative is correct. It is easy to see for yourself what the correct expression is by working it out with pen and paper, and see also the ...

7

Added after my initial answer: It appears to me now that the author of the referenced paper is giving condition numbers (apparently 2-norm condition numbers but possibly infinity-norm condition numbers) in the table while giving maximum absolute errors rather than norm relative errors or maximum elementwise relative errors (these are all different ...

6

For the how part referred to in the previous answer, conforming Quad or Hex mesh refinement is most likely going to use an algorithm based on the work of R. Schneiders' 2- and 3- refinement algorithms. These methods are used in mesh generation. Two papers that I happen to have that do adaptive conforming quad refinement are: "A new fast hybrid adaptive grid ...

6

For domains that are logically square or cubic (like your quadrilateral), you can use the tensor product (dimension-by-dimension) approach. That is, generate the 2D Gauss-Lobatto point matrix as the tensor product of your 1D Gauss-Lobatto point vectors. An example: if your 1D Gauss-Lobatto points are $(x_1,x_2)$, then in 2D you get the following four points:...

5

Let $w_k$ be the k-th column of W (the kth eigen-vector) and $v_k$ be the k-th element of v (the kth eigen-value). Then we can write: $$G = \sum_k w_k v_k w_k^T$$ which, element-wise, is equivalent to: $$G_{i,j} = \sum_k v_k w_{i,k} w_{j,k}$$ where the indices are column-major. Since we always get $w_k$ twice, an overall sign on a column of $W$ cancels. ...

5

I hope I understood the question correctly. They try to compute exactly the same thing, so they really are equivalent. I'll use Chebyshev polynomials because they are easy to analyze. Given a function $f(x)$ on $[-1,1]$, the spectral interpolant is the truncation of \begin{aligned} f(x) &= \sum_{n\geq0} \bar a_n T_n(x), \\ \bar a_n &= \frac{1+[n&... 5 "Spectral methods" usually means methods which make use of global basis functions. Fourier spectral methods use sine and cosine, and are used when you have periodic boundary conditions. Chebyshev methods use Chebyshev polynomials and are useful in non-periodic cases. These two methods are used in DNS, see e.g., hit3d which uses fourier and periodic bc, and ... 4 First, some notation for clarity. We're talking about solving u_{xx}=f(x). So u is the solution and f is the right hand side. What makes you think either of your solutions is or is not correct? To check your results, just compute two derivatives of your solution (using finite differences or FFT, either one) and compare with f. In your example, f ... 4 For something with a spectral flavor in time, look at deferred correction methods, starting with this paper. I would argue that they're not spectral in the usual sense of the word, but they give you a family of arbitrary-order Runge-Kutta methods, so if you think of "refining" by increasing the order (by adding more nodes), then the convergence can be ... 4 Chebyshev are orthogonal wrt to a weight function which is singular at the end-points. When you approximate a function f(x) with Chebyshev, the convergence of the approximations is not affected by the values of f or its derivatives at the end points. The convergence rate depends only on the smoothness of the function f and not on its boundary values. This is ... 4 "Get more RAM" may be one of your best options. :) Prices are reasonably low right now, and it's one of the best upgrades you can gift your computer anyway. 10k x 10k is borderline but still doable on modern computers: that matrix takes 10^4 \times 10^4 \times 8 bytes, that is, 760 MiB. On my laptop that code runs without problems. Another option is ... 3 The key steps are to consider the advection equation u_t + au_x = 0 where a=\omega/k is the advection speed. Exact solutions to this equation is of the form u(x,t) = f(x-at), where f(y) is an arbitrary function. For example, discretize using a standard Galerkin method we derive the weak form \int_\Omega v u_t dx + \int_\Omega a u_x = 0 Assuming ... 3 One approach to acceleration would go as follows: Assume that A^t=A(u^t) is the matrix you try to solve with, i.e., you are looking to solve the linear systems A^t x^t = b^t. $$Let me assume for a moment that f^t \ge 0, then A^t is a symmetric and positive definite matrix. (If my assumption should be wrong, then it is still symmetric but may no ... 3 1) One usually chooses one or two representative wall-normal distances and presents the spectra for <u'u'>, <v'v'>, etc. over the homogeneous directions. For example, see Figure 11 within Spalart 1988 (http://dx.doi.org/10.1017/s0022112088000345). 2) By "scale" do you mean a lengthscale? If so, a lengthscale quantifying what aspect of the flow?... 3 The paper [1] gives an explicit construction of the Bernstein form of a set of orthogonal polynomials on simplices based on Legendre polynomials. [1] Farouki, R.T., Goodman, T.N.T and Sauer, T: Construction of orthogonal bases for polynomials in Bernstein form on triangular and simplex domains, Computer Aided Geometric Design 20 (2003), 209-230, DOI: 10.... 3 Ah, I have realized the answer to my own question: It is important to recognize that the initial data v_0,...,v_N is not stored on a uniform grid, but rather at the Chebyshev points$$ x_j = \cos\frac{\pi j}{N},\qquad j=0,...,N.Now as long as the initial data has a decent polynomial interpolation, then \begin{align} v_j = p(x_j) &= a_0 + a_1x_j + \... 3 For incompressible spectral DNS, often you'll see reference to John Kim, Parviz Moin and Robert Moser (1987): Turbulence statistics in fully developed channel flow at low Reynolds number, Journal of Fluid Mechanics, 177, pp 133-166, which includes details on how continuity is enforced. You might also find the book Spectral Methods in Fluid Dynamics by ... 3 I'm assuming that you know how Chebyshev collocation methods work (but if not, let me know and I'll explain a bit more); a good introduction is Nick Trefethen's Spectral Methods in Matlab as well as his Approximation Theory and Approximation Practice (in particular Chapter 21). (But note that this code does Legendre collocation, not Chebyshev collocation!) ... 3 This is probably too late to help you, but here is a compact code that will do points, weights and first derivatives for Gauss, Lobatto or either Radau. function [x,w,A] = OCnonsymGLReig(n,meth) % code for nonsymmetric orthogonal collocation applications on 0 < x < 1 % n - interior points % meth = 1,2,3,4 for Gauss, Lobatto, Radau (right), ... 3 It's hard to tell from your phrasing and because your link is broken, but are your boundary conditions periodic or not? If the problem is periodic, then spectral methods are the way to go since Fourier series (and their discrete coutnerparts) converge much faster for periodic functions than for more general functions. For a 1-D problem like this, a ... 2 I think Rob Kirby told me once that he had written something on using Bernstein polynomials for FEM. Take a look at his web site at Texas Tech (or now at Baylor). 2 Goofy question, are you dealiasing in some fashion or is it unnecessary in your setup? The issue sounds convective in some sense otherwise I'd expect your diffusion dominated limit to misbehave. If not, you might see if using the skew-adjoint form of the convective operator improves things somewhat (see https://github.com/RhysU/suzerain/blob/master/... 2 In the comments you mentioned that f has a very special form. Let u:[a,b]\rightarrow \mathbb{R}. Then f:[a,b]\rightarrow\{0,1\} is defined for some set S \subset [a,b] as follows:f(x) = \begin{cases} 1 & \text{if $x \in S$,} \\ 0 & \text{otherwise.} \end{cases}$$As Bill Barth mentioned, you can now split the matrix A into two parts as$$...

2

You are correct that the $k=0$ mode corresponds to the mean (volume averaged) velocity in the domain. Because the equations for Stokes flow are Galilean invariant they are undetermined up to a constant (the mean flow). Usually this ambiguity is resolved by the boundary conditions, but purely periodic boundary conditions offer no such resolution. Instead, you ...

2

If you want to use nonperiodic boundary conditions, you could change the Fourier basis in the $y$-direction for your spectral method to a Chebyshev basis. Fast Chebyshev Transforms make use of Fast Fourier Transforms; both are linear transformations on function spaces, so switching between the two amounts to a change of basis, and you can reuse significant ...

2

This is more of a comment, but I believe the more common name for this is "positive trigonometric polynomial", so this book might be helpful. One approach (http://www.mit.edu/~parrilo/cdc03_workshop/Vandenberghe.pdf) is to use the result that the polynomial $$x(t) = r_0 + 2r_1\cos t + \cdots + 2r_n \cos nt$$ is nonnegative if and only if there is an $(n+1)... 2 Frequently some sort of velocity-pressure splitting is employed which gives a step in the method where the velocity and pressure are coupled directly. 2 What you are thinking of is something that uses the structure of the augmented matrix to make solution of the system simpler. For example, one could be tempted to think of forming the Schur complement with regard to the bottom right$2\times 2\$ block of the rewritten system. But I don't think anything like this exists. If it would, then you would have ...

Only top voted, non community-wiki answers of a minimum length are eligible


text:
40m QIL Cryo_Lab CTN SUS_Lab TCS_Lab OMC_Lab CRIME_Lab FEA ENG_Labs OptContFac Mariner WBEEShop
 40m Log Not logged in
 Sat May 9 17:01:08 2020, Yehonathan, Update, Loss Measurement, 40m Phase maps loss estimation Wed May 13 15:13:11 2020, Yehonathan, Update, Loss Measurement, 40m Phase maps loss estimation Thu May 14 12:21:56 2020, Yehonathan, Update, Loss Measurement, 40m Phase maps loss estimation Thu May 14 19:00:43 2020, Yehonathan, Update, Loss Measurement, 40m Phase maps loss estimation Tue May 19 15:39:04 2020, Yehonathan, Update, Loss Measurement, 40m Phase maps loss estimation
Message ID: 15333     Entry time: Thu May 14 19:00:43 2020     In reply to: 15332     Reply to this: 15338
 Author: Yehonathan Type: Update Category: Loss Measurement Subject: 40m Phase maps loss estimation

Perturbation theory:

The cavity modes $\left|q\rangle_{mn}$ , where q is the complex beam parameter and m,n is the mode index, are the eigenmodes of the cavity propagator. That is:

$\hat{R}_{ITM}\hat{K}_L\hat{R}_{ETM}\hat{K}_L\left|q\rangle_{mn}=e^{i\phi_g}\left|q\rangle_{mn}$,

where $\hat{R}$ is the mirror reflection matrix. At the 40m, ITM is flat, so $\hat{R}_{ITM}=\mathbb{I}$. ETM is curved, so $\hat{R}_{ETM}=e^{-i\frac{kr^2}{2R}}$, where R is the ETM's radius of curvature.

$\phi_g$ is the Gouy phase.

$\hat{K}_L=\frac{ik}{2\pi L}e^{\frac{ik}{2L}\left|\vec{r}-\vec{r}'\right|^2}$is the free-space field propagator. When acting on a state it propagates the field a distance L.

The phase maps perturb the reflection matrices slightly so:

$\hat{R}_{ITM}\rightarrow e^{ikh_1\left(x,y \right )}\approx 1+ikh_1\left(x,y \right )$

$\hat{R}_{ETM}\rightarrow e^{ikh_2\left(x,y \right )}e^{-i\frac{kr^2}{2R}}\approx\left[1+ikh_2\left(x,y \right )\right]e^{-i\frac{kr^2}{2R}}$,

Where h_12 are the height profiles of the ITM and ETM respectively. The new propagator is

$H = H_0+V$, where $H_0$ is the unperturbed propagator and

$V=ikh_1\left(x,y \right )H_0+ik\hat{K}_Lh_2\left(x,y \right )e^{-i\frac{kr^2}{2R}}\hat{K}_L$

To find the perturbed ground state mode we use first-order perturbation theory. The new ground state is then

$|\psi\rangle=\textsl{N}\left[ |q\rangle_{00}+\sum_{m\geq 1,n\geq1}^{}\frac{{}_{mn}\langle q|V|q\rangle_{00}}{1-e^{i\left(m+n \right )\phi_g}}|q\rangle_{mn}\right]$

Where N is the normalization factor. The (0,1) and (1,0) modes are omitted because they can be zeroed by tilting the mirrors. Gouy phase of TEM00 mode is taken to be 0.

Some simplification can be made here:

${}_{mn}\langle q|V|q\rangle_{00}={}_{mn}\langle q|ikh_1\left(x,y \right )|q\rangle_{00}+{}_{mn}\langle q|\hat{K}_Likh_2\left(x,y \right )e^{-i\frac{kr^2}{2R}}\hat{K}_L|q\rangle_{00}$

${}_{mn}\langle q|\hat{K}_Likh_2\left(x,y \right )e^{-i\frac{kr^2}{2R}}\hat{K}_L|q\rangle_{00}={}_{mn}\langle q-L|ikh_2\left(x,y \right )e^{-i\frac{kr^2}{2R}}|q+L\rangle_{00}={}_{mn}\langle q+L|ikh_2\left(x,y \right )|q+L\rangle_{00}$

The last step is possible since the beam parameter q matches the cavity.

The loss of the TEM00 mode is then:

$L=1-\left|{}_{00}\langle q|\psi\rangle\right|^2$

ELOG V3.1.3-


text:
×

# An Explanation for the Decimal System Problem

This is my simple explanation: The decimal system, first proposed by the Vedic Hindus, and then popularized by the Arabians is a positional number system (a one where position of a digit in the number carries some "weight"), and consists of ten fundamental symbols, viz.,0,1,2,3,4,5,6,7,8 and 9. So it is obvious that any number in this system has to be expressed using a combination of these ten digits. Suppose one is independently formulating the decimal system in his or her mind. He or she starts to count: ONE(1), TWO(2), THREE(3), FOUR(4), FIVE(5), SIX(7), SEVEN(7), EIGHT(8), NINE(9)..and then he or she gets stuck with the problem-How to express TEN? There is no digit in the system to express the number TEN. So, the person tries to exploit whatever is in his or her hand - the ten digits. He or she then goes back to the digit 0. But 0 has been already used once in order to express the number ZERO. So in order to express the number TEN, one is taking help of this zero once more. To signify this repetition of usage of the digit 0, he or she places a 1 (that is the number of times 0 is being repeated) to the left of zero. Now the writing of 1 to the left of 0 may be attributed to the fact that the Arabians used to write from right to left, a fact which I am not very much sure of. Thus, what are we doing in this process of constructing the numbers with the help of the ten digits? After the ten digits of the decimal system get exhausted as we denote the first ten whole numbers with them, starting from zero, we come back to 0 again in a cycle to express the numbers from ten onward, writing the number of repetitions on the left of the digit we are using for the particular number. The following image clarifies the explanation:

Note by Kuldeep Guha Mazumder
2 years ago


text:
# carbonate and bicarbonate in water

Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. https://doi.org/10.1016/S1872-2040(16)60913-1. The fact is calcium carbonate is insoluble and calcium bicarbonate is soluble in water. It's like the unconfortable situation where you have two close friends who both hate each other. Temperature is not fixed, but I will assume its close to room temperature; As other components are not mentioned, I will assume all carbonate comes from calcium carbonate. What happens? In aqueous solution, carbonate, bicarbonate, carbon dioxide, and carbonic acid exist together in a dynamic equilibrium. When the calcium carbonate dissolves, a equilibrium is established between its three forms, expressed by the respective equilibrium equations: First stage: With the $\mathrm{pH}$, I can find calculate $[\ce{OH-}]$ and $[\ce{H+}]$. rev 2021.1.11.38289, Sorry, we no longer support Internet Explorer, The best answers are voted up and rise to the top, Chemistry Stack Exchange works best with JavaScript enabled, Start here for a quick overview of the site, Detailed answers to any questions you might have, Discuss the workings and policies of this site, Learn more about Stack Overflow the company, Learn more about hiring developers or posting ads with us, $[\mathrm{alk}_{tot}]=[\ce{HCO3-}]+2[\ce{CO3^2-}]+[\ce{OH-}]-[\ce{H+}]$, $[\mathrm{alk}_{tot}]=[\ce{HCO3-}]+[\ce{OH-}]-[\ce{H+}]$. Magnesium Bicarbonate Drinking Water. With the expressions for all species, it's helpful to use a spreadsheet to automate the calculations for a entire range of pH values, to grasp in a visual way what happens with carbonates as pH changes. With water and carbon dioxide (preparation of sodium bicarbonate)– Na 2 CO 3 (saturated) + H 2 O + CO 2 2NaHCO 3 Reaction with hydrogen fluoride (diluted) Na 2 CO 3 + 2HF 2NaF + H 2 O + CO 2. Published by Elsevier B.V. All rights reserved. These equilibria are also of interest to scientists concerned with climate change. $$pH = pK1 + log(\frac{\ce{[H2CO3]}}{[HCO3-]})$$. High carbonate (CO3=) and bicarbonate (HCO3-) increases SAR index (around >3-4mEq/L or >180-240mg/L). What are practical examples of simultaneous measuring of quantities? Bicarbonate is the dominant form of dissolved inorganic carbon in sea water, and in most fresh waters. If I have three species, but only two show up together at any given time, I can "forget" I'm dealing with a diprotic acid. Thank you so much! In a given moment I can see you in a room talking with either friend, but I will never see you three in the same room, or both friends of yours. If heat is applied or a sharp increase in pH occurs, the Calcium Bicarbonate breaks down to form Carbon Dioxide and Calcium Carbonate. In the other side, if I'm below my dividing line near 8.6, carbonate ion concentration is zero, now I have to deal only with the pair carbonic acid/bicarbonate, pretending carbonic acid is just other monoprotic acid. Most carbonate salts are insoluble in water at standard temperature and pressure, with solubility constants of less than 1×10 −8. The molecular weight of carbonate is 60 grams … $$\ce{2H2O + H2CO3 <=> 2H3O+ + CO3^2-}$$ It is a worldwide problem to determine the real content of carbonate and bicarbonate ions in the freshwater. The dividing line is close to the pH 8.6 you mentioned in your question. $$K1 = \frac{\ce{[H3O+][HCO3-]}}{\ce{[H2CO3]}} \approx 4.47*10^-7$$, $$K2 = \frac{\ce{[H3O+][CO3^2-]}}{\ce{[HCO3-]}} \approx 4.69*10^-11$$, $$K1K2 = \frac{\ce{[H3O+]^2[CO3^2-]}}{\ce{[H2CO3]}}$$, $$Cs = \ce{[CaCO3]} = \ce{[H2CO3] + [HCO3-] + [CO3^2-]}$$, $$Cs = \ce{[H2CO3] + [HCO3-] + [CO3^2-]}$$, $$Cs = \ce{\frac{[HCO3-][H3O+]}{K1} + [HCO3-] + \frac{K2[HCO3-]}{[H3O+]}}$$, $$Cs = \ce{\frac{[HCO3-][H3O+]^2 + K1[HCO3-][H3O+] + K1K2[HCO3-]}{K1[H3O+]}}$$, $$\frac{\ce{[HCO3-]}}{Cs} = \ce{\frac{K1[H3O+]}{[H3O+]^2 + K1[H3O+] + K1K2}} = \alpha1$$, $$\alpha0 = \frac{\ce{[H2CO3]}}{Cs} = \ce{\frac{[H3O+]^2}{[H3O+]^2 + K1[H3O+] + K1K2}}$$, $$\alpha2 = \frac{\ce{[CO3^2-]}}{Cs} = \ce{\frac{K1K2}{[H3O+]^2 + K1[H3O+] + K1K2}}$$, $$\ce{[H3O+]} = \frac{\ce{K2[HCO3-]}}{\ce{[CO3^2-]}}$$, $$pH = pK2 + log(\frac{\ce{[HCO3-]}}{[CO3^2-]})$$, $$\ce{[H3O+]} = \frac{\ce{K1[H2CO3]}}{\ce{[HCO3-]}}$$, $$pH = pK1 + log(\frac{\ce{[H2CO3]}}{[HCO3-]})$$. It makes the problem easier to calculate. What sort of work environment would require both an electronic engineer and an anthropologist? They must sum to 1(100%), as in chemical reactions matter is neither created or destroyed, only changing between forms. So we are left with three unknown variables, $\ce{[H2CO3]}$, $\ce{[HCO3-]}$ and $\ce{[CO3^2+]}$. Is it possible to make a video that is provably non-manipulated? But it is my memory for chemical high school, focused on analytical chemistry in 1980-84 and subsequest undergrad lectures and labs. This work was supported by the Special Funds for Scientific Research of Ministry of Land and Resources of China (No. Why does the equilibrium constant depend on the temperature but not on pressure and concentration? In the most case, the coexisting cation, anion and weak acid (K+, Na+, Mg2+, Clâ, SO42â < 100 mg Lâ1, HSO3â, NO2â, HOAc < 50 mg Lâ1) did not interfere with the analysis. Each 1 liter bottle has 33 ounces of liquid with 3600 to 4400 mg of magnesium depending on how much MOM is in your original bottle you started the … Bicarbonate and Carbonate contain CO 2. Ammonium carbonate is a salt with the chemical formula (NH 4) 2 CO 3.Since it readily degrades to gaseous ammonia and carbon dioxide upon heating, it is used as a leavening agent and also as smelling salt.It is also known as baker's ammonia and was a predecessor to the more modern leavening agents baking soda and baking … I would like to evaluate carbonate and bicarbonate concentration from groundwater samples, but I only have values of total alkalinity as $\ce{CaCO3}$, $\mathrm{pH}$, and temperature. •Particulates can drop out of water and plug emitters or microsprinklers. Can 1 kilogram of radioactive material with half life of 5 years just decay in the next minute? A new approach was proposed for quick detection of carbonate and bicarbonate ions in groundwater and lake water through a pH electrode combined with a CO2 electrode. The plot that looks like a "XX" also allows us to see a interesting property of carbonates. Carbonate and Bicarbonate. The carbon dioxide that is dissolved by naturally circulating waters appears in chemical analysis principally as bicarbonate and carbonate ions. For a given pH, the concentration of each species can be computed multiplying the respective $\alpha$ by the concentration of total calcium carbonate originally present. That is; the compounds with carbonate ions are not soluble in water at the room temperature an… For the bicarbonate, for example: The method was applied in determination of bicarbonate and carbonate ions in the groundwater and lake water in Qinghai Province, China and it was found that the pH values in the groundwater samples from Haidong area were from 6.4 to 7.4, with the HCO3â content of 234â4096 mg Lâ1 and CO32â content of 0.16â1.89 mg Lâ1, and the samples from Qinghai Lake had a pH about 8.7, with the HCO3â content of 1.36â1.86 g Lâ1and CO32â- content of 32.3â43.9 mg Lâ1, which was consistent with the previous results. Structure of Sodium Carbonate Each molecule of sodium carbonate contains 2 sodium atoms, one carbon atom and 3 oxygen atoms. Generally, Stocks move the index. As we know the pH and K1, we can calculate the ratio between carbonic acid and bicarbonate. A bit over 6 bicarbonate ion takes over, and reigns up to pH a bit over 10, from where fully ionized carbonate ion takes over. Bicarbonate + Carbonate: Irrigation water that contains levels of bicarbonate plus carbonate (especially above 3.0 meq/L (183 ppm) [combined]) are considered very harmful for two primary reasons. As such it is an important sink in the carbon cycle. Carbonate and bicarbonate ions can bind to toxic metals in water and precipitate them out of the water as solids, acting as a natural cleaning system and giving the water somewhat of a resistance to certain types of pollution. What does it mean for a word or phrase to be a "game term"? I remember getting 2 values, for titration to phenolphthaleinum ( if alkalic enough ) and methyl orange titration ends. $$\ce{H2O + HCO3- <=> H3O+ + CO3^2-}$$ Aqueous bicarbonate/carbonate ionic equilibria play an important role in determining the practicality of various aqueous-alkaline fuel cells and the hot carbonate process for removing carbon dioxide from synthesis gas streams. How to prevent players from having a specific item in their inventory? A 1 kilometre wide sphere of U-235 appears in an orbit around our planet. I did just that, look at the results (here the spreadsheet, to whomever wants to download and play with it): We see that in lower pH the predominant form for carbonate is the free carbonic acid. I need only to see the dividing line I've found, around pH 8.6. The full treatment I gave to this problem was indeed overkill. This resistance to pH change is commonly referred to as “buffering capacity”. The accuracy of the method was proved to be well matched with acid-base titration. $$Cs = \ce{[H2CO3] + [HCO3-] + [CO3^2-]}$$ Bicarbonates in Water •Water above pH 7.5 is usually associated with high bicarbonates. In this article, we report … The content of carbonate (HCO3â) and bicarbonate (CO32â) in the freshwater is an important characteristic of the geochemical environment. The first was took for carbonates only and MO for carbonate + bicarbonate weighed sum. The content of carbonate and bicarbonate in the freshwater varies along with the change of temperature, air pressure and other environmental factors, so it is difficult to determine their real content. While the bicarbonate salt has been shown to be moderately soluble in water, the solubility of Calcium Carbonate at 25 °C is only … Want to improve this question? This method measures bicarbonate (HCO 3-), carbonate (CO 3 2-) and alkalinity levels in water.Quantitation is by titration with 0.025 N H 2 SO 4.The method has a routine detection limit of 0.1 meq/L but is capable of a method detection limit for alkalinity … When the raw water contains more calcium than bicarbonate (CaH >> M-alk. ), carbonate removal using sodium hydroxide may be an option (alternative: lime + sodium carbonate). Why is my child so scared of strangers? Some of the $\mathrm{pH}$ values are above 8.3. Because alkalinity can both give and receive Hydrogen, it slows the change in pH. And in the end, become useless. If you want to study in depth such calculations, I recommend this book: Butler, James N. Ionic Equilibrium: Solubility and PH Calculations. But carbonate only shows up when carbonic acid goes away. This proportion is commonly refered as the alpha($\alpha$) for a given species, that varies from 0 to 1(0% - 100%). $$Cs = \ce{\frac{[HCO3-][H3O+]}{K1} + [HCO3-] + \frac{K2[HCO3-]}{[H3O+]}}$$ When it makes contact with water it slowly losing its acidity. contaminants on laboratory prepared water based drilling mud at ambient conditions. This part of water hardness is defined via the titration of all carbonates, bicarbonates, and hydroxides and is expressed in equivalent amounts of calcium … What if the temperature is lower than or higher than room temperature? We know the amount of CO 2 in your water determines the pH, thanks to physics. A rapid and convenient method for the measurement of bicarbonate, carbonate, or carbon dioxide in water was developed using fourier transform infrared spectroscopy (FTIR). For sake of brevity, I won't do it, but the final result will be: $$\alpha2 = \frac{\ce{[CO3^2-]}}{Cs} = \ce{\frac{K1K2}{[H3O+]^2 + K1[H3O+] + K1K2}}$$. The expressions for the remaining two species have the same structure, just changing the term that goes in the numerator. 201411083-3), the Geological Survey Project of China (Nos. It can be calculated exactly but the method depends a bit on the conditions of the water. Its solubility is about 300–400 ppm at 25 °C. To solve this problem, a new approach was proposed for the rapid determination of carbonate and bicarbonate ions in groundwater and lake water through a pH electrode combined with a CO2 electrode. Why is there no Vice Presidential line of succession? It's been a long time since I did my chemistry classes and I'm currently trying to analyze groundwater samples for hydrogeology purposes. $$\frac{\ce{[HCO3-]}}{Cs} = \ce{\frac{K1[H3O+]}{[H3O+]^2 + K1[H3O+] + K1K2}} = \alpha1$$, So we got the expression for $\alpha1$, that has a curious structure: a fraction, where the denominator is a polynomial of degree 2, and the numerator its middle term. When you added in a great amount of water and the substance dissolved, potassium carbonate is separate into almost pure ethanol. Copyright Â© 2016 Changchun Institute of Applied Chemistry, Chinese Academy of Sciences. The method was validated for real water samples and the recoveries were in the range of 95.2%â99.2% with the relative standard deviations (RSDs) of 2.6%â3.7%. What would make a plant's leaves razor-sharp? Bartenshaw … As we assumed all carbonate came from calcium carbonate, we can write: $$\ce{[H3O+]} = \frac{\ce{K1[H2CO3]}}{\ce{[HCO3-]}}$$, Or in logarithimic form: A bit over 6 bicarbonate ion takes over, and reigns up to pH a bit over 10, from where fully ionized carbonate ion takes over. The magnesium bicarbonate water recipe produces in a two liter bottle, 1,800 mg of magnesium and 7,500 mg of bicarbonate water. Ground water, which contains carbonates and bicarbonates that consume acid, requires higher amounts of acid to reach the same target pH. Can index also move the stock? Addition of base to an excess of carbonic acid gives bicarbonate (hydrogen carbonate). Authors; Authors and affiliations; Thomas Roy Crompton; Chapter. How is the Ogre's greatclub damage constructed in Pathfinder? In general, the method was sensitive, fast, economical, easy to carry and simple to operate, which was appropriate for rapid detection of bicarbonate and carbonate ions in freshwater in field. $$K1K2 = \frac{\ce{[H3O+]^2[CO3^2-]}}{\ce{[H2CO3]}}$$, Analysing our system, to give a full treatment, if we know the solution pH, we can calculate $\ce{[H3O+]}$. Is it possible? Furthermore, the ability to dissolve in water also contributes to a difference between carbonate and bicarbonate. •Forms bicarbonate salts with Ca, Mg, Na, and K. •High Ca concentrations will react to form Calcium carbonate or line. The ex- Available online 8 September 2011 periment was conducted using juveniles stocked in 150-L 12 tanks at a density of 333 shrimp/m 3. If I understood your question correctly, you have solutions where you know there is a given amount of calcium carbonate dissolved, and would like to know the distribution of this carbonate between all the species present. In irrigation water that has a pH less than 7, carbonate and bicarbonate are at low concentrations and there are generally no problems. Bicarbonate is the critical component in the measurement of temporary water hardness (carbonate hardness). The content of carbonate (HCO 3−) and bicarbonate (CO 32−) in the freshwater is an important characteristic of the geochemical environment. But so far we have only two independent mathematical equations, for K1 and K2 (the overrall equation does't count as independent, as it's only the merging together of the other two). The addition of two molecules of water to CO 2 would give orthocarbonic acid, C (OH) 4, which exists only in minute amounts in aqueous solution. In order to ensure that the water is pleasant to drink, a certain M-alk. is it nature or nurture? Remember that Henderson-Hasselbalch provides the equilibrium ratio of concentrations at a given pH. When bicarbonate and carbonate molecules absorb hydrogen ions, … As we know the pH and K2, we can calculate the ratio between carbonate and bicarbonate. However, the environmental factors affect the concentration of two ions easily during the process of sampling, transportation and storage. Why doesn't IList only inherit from ICollection? Reason #1: Bicarbonates and carbonates will combine with calcium to form lime (CaCO3) when the water … In freshwater ecology, strong photosynthetic activity by freshwater plants in daylight releases gaseous oxygen into the water and at the same time produces bicarbonate ions. By continuing you agree to the use of cookies. $$Cs = \ce{\frac{[HCO3-][H3O+]^2 + K1[HCO3-][H3O+] + K1K2[HCO3-]}{K1[H3O+]}}$$ $$pH = pK2 + log(\frac{\ce{[HCO3-]}}{[CO3^2-]})$$. Bicarbonate and carbonate are converted to carbon dioxide by lowering the pH of the solution, then the absorbance of the dissolved … Nowhere in the plot you will find a pH value where we have the three species all in significant amounts. It is a valuable water quality parameter used for many applications, including, but not limited to: drinking water treatment, domestic and industrial wastewater treatment, swimming pools, food and beverage, soil, agriculture, and other environmental testing. Does it change the "K" values? The same thing happens to Potassium Carbonate. 8.3. Calcium Carbonate (CaCO 3) is a precipitate of bicarbonate. Three mud samples each has a different concentrations of Sodium Carbonate (Na 2 CO 3) and Sodium Bicarbonate (NaHCO 3) contaminants were mixed with Water Based Mud (WBM) fluid and formulated to investigate their effect on drilling fluid … This study evaluated the effects of calcium hydroxide, sodium Accepted 25 August 2011 carbonate and bicarbonate in maintaining water quality during the cultivation of L. vannamei in BFT. 1 Citations; 343 Downloads; Abstract. $$\ce{[H3O+]} = \frac{\ce{K2[HCO3-]}}{\ce{[CO3^2-]}}$$, Or in logarithimic form: This means that when people dissolve baking soda in water, it forms an alkaline solution. Google Scholar. The acid-base balance in blood is controlled by the capacity of the respiratory system to remove excess carbon dioxide—also by the ability of the kidneys to excrete wastes in urine, and by a … But how can I calculate $[\ce{HCO3-}]$ and $[\ce{CO3^2-}]$? If a exact result is desired, it's necessary to account for that, and use the constants corrected for the actual temperature. Calculation of Bicarbonate, Carbonate and Hydroxide Alkalinity 1. remember, total alkalinity is the amount of acid required to lower the pH of the solution to 4.5 ... 50 mg/meq (Snoeynik and Jenkins, 1980 Water Chemistry) when converting eq/m3 to mg/L 2. reason is that occasionally CaCO 3 has a valence of 1 instead of 2 giving it … $$K1 = \frac{\ce{[H3O+][HCO3-]}}{\ce{[H2CO3]}} \approx 4.47*10^-7$$, Second stage: It only takes a minute to sign up. Note that a interesting pattern emerges. Another significant difference between carbonate and bicarbonate is that, in strongly basic conditions, there will be more carbonate ions, whereas, bicarbonate ions will be more in weak basic solution. 8.4. will have to be re-instated by mixing the water with a fraction of water … Why does Steven Pinker say that “can’t” + “any” is just as much of a double-negative as “can’t” + “no” is in “I can’t get no/any satisfaction”? Bicarbonate hazard of irrigation water. In water, carbonate and bicarbonate always occur together in solution in equilibrium with one another, with the pH and with atmospheric carbon dioxide. But unless the difference in temperature is big, the error will be probably acceptable. $$K2 = \frac{\ce{[H3O+][CO3^2-]}}{\ce{[HCO3-]}} \approx 4.69*10^-11$$, You can also write a equation for the overrall reaction, by sum of each stage (and multiplication of the respective equilibrium constants): With excess base, carbonic acid reacts to give carbonate salts. Exceptions include sodium, potassium and ammonium carbonates. Paid off $5,000 credit card 7 weeks ago but the money never came out of my checking account, Proper technique to adding a wire to existing pigtail, How Functional Programming achieves "No runtime exceptions". Magnesium bicarbonate water is a therapeutic form of water that supplies bicarbonates along with necessary magnesium. However, the environmental factors affect the concentration of two ions easily during the process of sampling, transportation and storage. How do you run a test suite from VS Code? The results showed that the liner range of bicarbonate was 0.027â570 mg Lâ1 and that of carbonate was 1.25 Ã 10â8â39.7 mg Lâ1. The determination of alkalinity and acidity in water. Let's explain why: Bicarbonate and carbonate ions combined with calciumor magnesiumwill precipitate as calcium carbonate(CaCO3) or magnesium carbonate (MgCO3) when … Alkalinity is calculated by the amount of acid needed to adjust the pH to ~4.5 in groundwater … What is the best way to calculate the mass percentage of Calcium Carbonate from water? ScienceDirect Â® is a registered trademark of Elsevier B.V. ScienceDirect Â® is a registered trademark of Elsevier B.V. Fast Detection of Carbonate and Bicarbonate in Groundwater and Lake Water by Coupled Ion Selective Electrode, Special Funds for Scientific Research of Ministry of Land and Resources of China. Yes, they do. How do the material components of Heat Metal work? Carbonate that follows this path represents a linkage between the carbon cycle and the hydrologic cycle. This is the old HendersonâHasselbalch equation you surely heard about before. Copyright Â© 2021 Elsevier B.V. or its licensors or contributors. Carbonate has a -2 charge while bicarbonate has a -1 charge due to the extra hydrogen proton it contains. What we need is the equation for the material balance of the system. However, the electrodes were temperature sensitive, so the standard solution and samples should be measured at the same temperature. To solve it, we need at least one more independent equation, to match the number of unknows. We use cookies to help provide and enhance our service and tailor content and ads. If I'm above it, free carbonic acid concentration is zero, and I have to deal only with the pair bicarbonate/carbonate, pretending the bicarbonate anion is just a monoprotic acid. $$Cs = \ce{[CaCO3]} = \ce{[H2CO3] + [HCO3-] + [CO3^2-]}$$, Where Cs here stands for the known concentration of the salt, calcium carbonate. 5 years just decay in the carbon cycle the temperature but not on pressure and concentration a. Measuring of quantities and concentration swimming pools hydroxide may be an option ( alternative lime! You know that alkalinity is only found as carbonate and bicarbonate ions in the measurement of water... Water determines the pH of swimming pools also contributes to a difference between carbonate and?... ( Nos Presidential line of succession known as sodium bicarbonate, carbon dioxide and Calcium or! As sodium bicarbonate, carbon dioxide that is provably non-manipulated electrodes were temperature sensitive so! Carbonates only and MO for carbonate + bicarbonate weighed sum friends who both each. Look this question: how to prevent players from having a specific item in their inventory like! The actual temperature result is desired, it 's been a long time since I my! Question and answer site for scientists, academics, teachers, and students in the the... The$ \mathrm { pH } $values are above 8.3 mg,,. Liner range of bicarbonate was 0.027â570 mg Lâ1 just changing the term that goes in measurement... Sons, 1998. site design / logo © 2021 Stack Exchange sampling, transportation and storage components heat!, it forms an alkaline solution water and plug emitters or microsprinklers half life of 5 years just in. Same structure, just changing the term that goes in the next minute and vice versa term! Update the question so it 's been a long time since I did my chemistry classes and I 'm trying. Molecule of sodium carbonate ) measurement of temporary water hardness ( carbonate hardness ) are generally no problems give... Applied or a sharp increase in pH occurs, the environmental factors affect the concentration two... 8 September 2011 periment was conducted using juveniles stocked in 150-L 12 tanks at a given pH be well with! The ratio between carbonic acid gives bicarbonate ( CaH > > M-alk soluble water! Unless the difference in temperature is big, the environmental factors affect the concentration two. Phenolphthaleinum ( if alkalic enough ) and methyl orange titration ends to solve it, can... In solution, carbonate removal using sodium hydroxide may be an option alternative! Index ( around > 3-4mEq/L or > 180-240mg/L ) friends who both hate other., the ability to dissolve in water the real content of carbonate was 1.25 10â8â39.7! Or higher than room temperature and Calcium carbonate from total alkalinity [ closed ] carbonate and bicarbonate in water chemistry.stackexchange.com/questions/9108/… design / ©... Classes and I 'm currently trying to analyze groundwater samples for hydrogeology purposes constants. Should be measured at the same structure, just changing the term goes! Index ( around carbonate and bicarbonate in water 3-4mEq/L or > 180-240mg/L ) alkalinity [ closed ], chemistry.stackexchange.com/questions/9108/… samples be! Academy of Sciences orbit around our planet and samples should be measured the... Contact with water it slowly losing its acidity between carbonic acid and bicarbonate at! Of Calcium carbonate from total alkalinity [ closed ], chemistry.stackexchange.com/questions/9108/…, thanks to physics we know the 8.6... Easily during the process of sampling, transportation and storage of swimming pools U-235 appears an..., isolating each unknow water based drilling mud at ambient conditions enough ) and bicarbonate based drilling at... Be an option ( alternative: lime + sodium carbonate ) work environment would require an. And Calcium bicarbonate breaks down to form carbon dioxide, and carbonic acid to. Trying to analyze groundwater samples for hydrogeology purposes also allows us to see a interesting property of carbonates the in. Update the question so it 's necessary to account for that, and carbonic acid Federation 53: Google! Results showed that the liner range of bicarbonate was 0.027â570 mg Lâ1 and that of carbonate was Ã... ], chemistry.stackexchange.com/questions/9108/… bicarbonate breaks down to form carbon dioxide that is dissolved by circulating... Methyl orange titration ends the process of sampling, transportation and storage dissolved by naturally circulating waters appears an...: lime + sodium carbonate ) as carbonate and bicarbonate tailor content and ads use the constants corrected the. Independent equation, to match the number of unknows oxygen atoms its acidity of water and plug emitters or.... Follows this path represents a carbonate and bicarbonate in water between the carbon cycle and the hydrologic cycle than or than... Enhance our service and tailor content and ads option ( alternative: lime + sodium carbonate contains 2 sodium,! But it is my memory for chemical high school, focused on analytical chemistry in 1980-84 subsequest. { CO3^2- } ]$ and $[ \ce { HCO3- } ]$ around > or! Affect the concentration of two ions easily during the process of sampling, transportation and storage simultaneous measuring quantities. In a great amount of water and the hydrologic cycle lime + sodium contains! The Ogre 's greatclub damage constructed in Pathfinder of Sciences expressions into the material,. An excess of carbonic acid goes away Google Scholar temperature carbonate and bicarbonate in water, so standard. The temperature is big, the ability to dissolve in water & Sons, 1998. site design / logo 2021... ( no principally as bicarbonate and carbonate from total alkalinity [ closed ],.. It 's necessary to account for that, and use the constants corrected the. Form carbon dioxide and Calcium carbonate from water determine the real content of carbonate is separate almost... Two species have the same temperature of China ( Nos the dominant form of dissolved inorganic carbon sea... We need is the critical component in the next minute enhance our service and tailor content ads. Form carbon dioxide and Calcium bicarbonate breaks down to form carbon dioxide, students! That of carbonate was 1.25 Ã 10â8â39.7 mg Lâ1 the fact is carbonate. ( no licensors or contributors on analytical chemistry in 1980-84 and subsequest undergrad lectures and labs acid and bicarbonate circulating... And methyl orange titration ends term '' kilometre wide sphere of U-235 appears in chemical principally! Some of the method was proved to be a  game term '' percentage of Calcium carbonate or.. Know the amount of water and plug emitters or microsprinklers carbonate was 1.25 10â8â39.7. Fact is Calcium carbonate bicarbonate breaks down to form carbon dioxide, and carbonic acid the numerator concentrations a... Require both an electronic engineer and an anthropologist ( 1981 ) J water Pollution Federation! Chinese Academy of Sciences of temporary water hardness ( carbonate hardness ) to phenolphthaleinum ( if alkalic enough ) bicarbonate. Gave to this problem was indeed overkill constants corrected for the actual temperature can calculate... It possible to make a video that is provably non-manipulated of irrigation water that has a pH where! Available online 8 September 2011 periment was conducted using juveniles stocked in 150-L 12 tanks at a density 333... You will find a pH value where we have the three species all significant. 1998. site design / logo © 2021 Stack Exchange students in the field of chemistry \ce. And carbonic acid gives bicarbonate ( HCO3- ) increases SAR index ( around > 3-4mEq/L or > 180-240mg/L ) mud... The ex- Available online 8 September 2011 periment was conducted using juveniles stocked in 150-L 12 tanks at a pH. Use of cookies this path represents a linkage between the carbon cycle and hydrologic! The fact is Calcium carbonate change is commonly referred to as “ buffering capacity ” of bicarbonate was 0.027â570 Lâ1... Fact is Calcium carbonate from water in a dynamic equilibrium carbonate contains 2 sodium atoms, one carbon atom 3! Practical examples of simultaneous measuring of quantities my chemistry classes and I 'm currently trying to analyze groundwater samples hydrogeology... Of unknows isolating each unknow samples for hydrogeology purposes of interest to scientists concerned with climate change Survey of! Stocked in 150-L 12 tanks at a density of 333 shrimp/m 3 carbonates! Is insoluble and Calcium bicarbonate is soluble in water necessary to account for that, and vice versa will a. Kilometre wide sphere of U-235 appears in an orbit around our planet of CO 2 in your question bicarbonate! And answer site for scientists, academics, teachers, and in most fresh waters amount of water and hydrologic! On-Topic for chemistry Stack Exchange is a question and answer site for scientists, academics, teachers, students! All in significant amounts 's necessary to account for that, and K. •High Ca will. Are also of interest to scientists concerned with climate change for scientists, academics, teachers and. Than 7, carbonate, bicarbonate, carbon dioxide that is dissolved by naturally circulating waters appears in chemical principally! Unconfortable situation where you have two close carbonate and bicarbonate in water who both hate each other sharp increase in.... Same structure, just changing the term that goes in the next minute the old equation! The same structure, just changing the term that goes in the lower the pH K2. ( 1981 ) J water Pollution Control Federation 53: 1243 Google Scholar Crompton! Liner range of bicarbonate was 0.027â570 mg Lâ1 Scientific Research of Ministry of Land Resources... You mentioned in your question solubility is about 300–400 ppm at 25.. Contributions licensed under cc by-sa undergrad lectures and labs, potassium carbonate is separate into almost pure..


text:
# How to evaluate $I=\int_0^{\pi/2}x^2\ln(\sin x)\ln(\cos x)\ \mathrm dx$

Find the value of $I=\displaystyle\int_0^{\pi/2}x^2\ln(\sin x)\ln(\cos x)\ \mathrm dx$

We have the information that $J=\displaystyle\int_0^{\pi/2}x\ln(\sin x)\ln(\cos x)\ \mathrm dx=\dfrac{(\pi\ln{2})^2}{8}-\dfrac{\pi^4}{192}$

• if you represent ln(cos(x)) as ln(d(sinx)dx)? Mar 14, 2013 at 5:31
• Please refrain from using \displaystyle in the title. Mar 14, 2013 at 5:31
• this one is answer ,but no step is shown from wolframalpha!enter image description here Mar 14, 2013 at 5:37
• Use sympy: from sympy import * x=Symbol('x') integrate(x**2*log(cos(x))*log(sin(x)),(x,0,pi/2)) Mar 14, 2013 at 5:56
• I have changed the formatting of the title so as to make it take up less vertical space -- this is a policy to ensure that the scarce space on the main page is distributed evenly over the questions. See here for more information. Please take this into consideration for future questions. Thanks in advance. Mar 12, 2018 at 16:51

Tools Needed \begin{align} \frac1{k(j-k)^2}&=\frac1{j^2k}-\frac1{j^2(k-j)}+\frac1{j(k-j)^2}\tag{1}\\ \frac1{k(j+k)^2}&=\frac1{j^2k}-\frac1{j^2(k+j)}-\frac1{j(k+j)^2}\tag{2}\\ \log(\sin(x))&=-\log(2)-\sum_{k=1}^\infty\frac{\cos(2kx)}{k}\tag{3}\\ \log(\cos(x))&=-\log(2)-\sum_{k=1}^\infty(-1)^k\frac{\cos(2kx)}{k}\tag{4}\\ \cos(2jx)\cos(2kx)&=\frac12\Big[\cos(2(j-k)x)+\cos(2(j+k)x)\Big]\tag{5}\\ \end{align} $$\int_0^{\pi/2}x^2\cos(2kx)\,\mathrm{d}x=\left\{ \begin{array}{} (-1)^k\frac\pi{4k^2}&\text{if }k\ne0\\ \frac{\pi^3}{24}&\text{if }k=0 \end{array}\right.\tag{6}\\$$

Tool Use \begin{align} &\int_0^{\pi/2}x^2\log(\sin(x))\log(\cos(x))\,\mathrm{d}x\\[12pt] &=\int_0^{\pi/2}x^2\left(\log(2)+\sum_{k=1}^\infty\frac{\cos(2kx)}{k}\right)\left(\log(2)+\sum_{k=1}^\infty(-1)^k\frac{\cos(2kx)}{k}\right)\,\mathrm{d}x\\[12pt] &=\log(2)^2\int_0^{\pi/2}x^2\,\mathrm{d}x +\log(2)\sum_{k=1}^\infty\frac1k\int_0^{\pi/2}x^2\cos(4kx)\,\mathrm{d}x\\ &+\sum_{j=1}^\infty\sum_{k=1}^\infty\frac{(-1)^k}{2jk}\int_0^{\pi/2}x^2\Big[\cos(2(j-k)x)+\cos(2(j+k)x)\Big]\,\mathrm{d}x\\[12pt] &=\frac{\pi^3}{24}\log(2)^2+\log(2)\frac\pi{16}\zeta(3)\\ &+\frac\pi8\sum_{j=1}^\infty\sum_{k=1}^\infty\frac{(-1)^j}{jk}\left[\mathrm{iif}\left(j=k,\frac{\pi^2}{6},\frac1{(j-k)^2}\right)+\frac1{(j+k)^2}\right]\\[12pt] &=\frac{\pi^3}{24}\log(2)^2+\log(2)\frac\pi{16}\zeta(3)\\ &+\frac\pi8\sum_{j=1}^\infty\frac{(-1)^j}{j}\sum_{k=1}^{j-1}\frac1{k(j-k)^2} +\frac\pi8\sum_{j=1}^\infty\frac{(-1)^j}{j^2}\frac{\pi^2}{6} +\frac\pi8\sum_{j=1}^\infty\frac{(-1)^j}{j}\sum_{k=j+1}^\infty\frac1{k(j-k)^2}\\ &+\frac\pi8\sum_{j=1}^\infty\frac{(-1)^j}{j}\sum_{k=1}^\infty\frac1{k(j+k)^2}\\[12pt] &=\frac{\pi^3}{24}\log(2)^2+\log(2)\frac\pi{16}\zeta(3)\\ &+\frac\pi8\sum_{j=1}^\infty\frac{(-1)^j}{j}\left(\frac2{j^2}H_{j-1}+\frac1jH_{j-1}^{(2)}\right) -\frac{\pi^5}{576} +\frac\pi8\sum_{j=1}^\infty\frac{(-1)^j}{j}\left(-\frac1{j^2}H_j+\frac1j\frac{\pi^2}{6}\right)\\ &+\frac\pi8\sum_{j=1}^\infty\frac{(-1)^j}{j}\left(\frac1{j^2}H_j-\frac1j\frac{\pi^2}{6}+\frac1jH_j^{(2)}\right)\\[12pt] &=\frac{\pi^3}{24}\log(2)^2+\log(2)\frac\pi{16}\zeta(3)\\ &+\frac\pi8\sum_{j=1}^\infty\frac{(-1)^j}{j}\left(\frac2{j^2}H_j+\frac2jH_j^{(2)}-\frac3{j^3}\right) -\frac{\pi^5}{576}\\[12pt] &=\frac{\pi^3}{24}\log(2)^2+\log(2)\frac\pi{16}\zeta(3)+\frac{11\pi^5}{5760} +\frac\pi4\sum(-1)^j\left(\frac1{j^3}H_j+\frac1{j^2}H_j^{(2)}\right)\\[12pt] &=\frac{\pi^3}{24}\log(2)^2+\log(2)\frac\pi{16}\zeta(3)-\frac{\pi^5}{960} -\frac\pi{16}\sum_{j=1}^\infty\frac1{j^3}H_{2j}\tag{7} \end{align} Numerically, $(7)$ matches the integral. I'm working on the last harmonic sum. Both numerical integration and $(7)$ yield $0.0778219793722938643380944$.

Mathematica Help

Thanks to Artes' answer on Mathematica, I have verified that these agree to 100 places.

• @MhenniBenghorbal: to be honest, the last equation in $(7)$ requires a page and a half of computation. I can append those if requested, but I didn't want to unnecessarily clutter the answer.
– robjohn
Mar 15, 2013 at 21:38
• @MhenniBenghorbal: Thanks! Using those functions, $(7)$ is $$\frac{\pi^3}{24}\log(2)^2+\log(2)\frac\pi{16}\zeta(3)+\frac{11\pi^5}{5760} -\frac\pi4(A(1,3)+A(2,2))$$
– robjohn
Mar 15, 2013 at 22:05
• (+1) I also tried this approach, but just gave up because of the required amount of calculation. I purely admire all your efforts toward the conclusion. Mar 16, 2013 at 4:06
• @robjohn: The value of that last Euler Sum is $$-\frac{\pi ^4}{15}-\frac{1}{3} \pi^2 \log^2(2)+\frac{\log^4(2)}{3}+8 \text{Li}_4\left(\frac{1}{2}\right)+7 \log(2)\zeta(3)$$ For it's proof you can refer to this page. Jan 11, 2014 at 8:55
• Can someone please post the full answer, then? I mean, (7) with the sigma replaced by Integrals-and-Series's answer. Aug 24, 2014 at 2:30

I'm still struggling with this integral, but I guess the following result may have a chance to be helpful:

\begin{align*} \int_{0}^{\frac{\pi}{2}} x^2 \log^2 \cos x \, dx &= \frac{11 \pi^5}{1440} + \frac{\pi^3}{24} \log^2 2 + \frac{\pi}{2}\zeta(3) \log 2 \tag{1} \\ &\approx 4.2671523609840988652 \cdots. \end{align*}

To prove this, let us consider the following identity

$$\int_{0}^{\frac{\pi}{2}} \cos^{z}x \cos wx \, dx = \frac{\pi}{2^{z+1}} \binom{z}{\frac{z+w}{2}}.$$

You can find the proof of this identity at here. Thus it follows that

$$\int_{0}^{\frac{\pi}{2}} x^2 \log^2 \cos x \, dx = - \left. \frac{\partial^4}{\partial z^2 \partial w^2} \frac{\pi}{2^{z+1}} \binom{z}{\frac{z+w}{2}} \right|_{(z, w) = (0, 0)}.$$

Performing a bunch of calculations, we obtain $(1)$. Similar idea shows that

$$\int_{0}^{\frac{\pi}{2}} \log^2 \cos x \, dx = \left. \frac{\partial^2}{\partial z^2} \frac{\pi}{2^{z+1}} \binom{z}{\frac{z+w}{2}} \right|_{(z, w) = (0, 0)} = \frac{\pi^3}{24} + \frac{\pi}{2}\log 2. \tag{2}$$

Indeed, starting from the identity

$$\log^2 \left( \frac{\sin 2x}{2} \right) = \log^2 \cos x + \log^2 \sin x + 2\log \cos x \log \sin x,$$

I obtained

\begin{align*}I &= -\frac{7}{8}\int_{0}^{\frac{\pi}{2}} x^2 \log^2 \cos x \, dx + \frac{\pi}{2} \int_{0}^{\frac{\pi}{2}} x \log^2 \cos x \, dx - \frac{3\pi^2}{32} \int_{0}^{\frac{\pi}{2}} \log^2 \cos x \, dx \\ &\quad -\frac{\log 2}{8}\int_{0}^{\pi} x^2 \log \sin x \, dx + \frac{\pi^3}{48} \log^2 2 \\ &\approx 0.077821979372293864338\cdots. \end{align*}

From the identity

$$\log \sin x = -\log 2 - \sum_{n=1}^{\infty} \frac{\cos 2nx}{n},$$

we obtain

$$\int_{0}^{\pi} x^2 \log \sin x \, dx = -\frac{\pi}{2} \zeta (3) - \frac{\pi^3}{3} \log 2. \tag{3}$$

Putting $(1)$, $(2)$ and $(3)$ together, I was able to derive

\begin{align*}I &= -\frac{61 \pi^5}{5760} - \frac{3\pi}{8} \zeta (3) \log 2 -\frac{\pi^3}{48} \log^2 2 + \frac{\pi}{2} \int_{0}^{\frac{\pi}{2}} x \log^2 \cos x \, dx. \end{align*}

I'm not sure if this formula will be helpful, since the last remaining integral seems to defy my techniques.

• I meant to upvote this earlier, but got distracted. I had forgotten about the cosine expansion for $\log(\cos(x))$ and $\log(\sin(x))$ until you used one here.
– robjohn
Mar 16, 2013 at 4:15
• For the last integral you can use the following technique since we have $$\int_0^{\Large\frac\pi2}\cos^{n-1}x\cos ax\ dx=\frac{\pi}{2^n n\ \operatorname{B}\left(\frac{n+a+1}{2},\frac{n-a+1}{2}\right)}$$ Sep 18, 2014 at 13:02

This is yet another partial answer, and a verification of some other claims.

Using $(4)$ and $(8)$ from this answer, we get $$\int_0^{\pi/2}\log(\sin(x))\log(\cos(x))\,\mathrm{d}x=\frac\pi2\log(2)^2-\frac{\pi^3}{48}\tag{1}$$ Here is a way to extend kalpeshmpopat's suggestion about substituting $x\mapsto\frac\pi2-x$. Note that $g(x)=f(\sin(x))f(\cos(x))$ is even as a function of $x-\frac\pi4$; that is, $g(\frac\pi2-x)=g(x)$. Thus, if we multiply by an odd function of $x-\frac\pi4$, the integral over $[0,\frac\pi2]$ will be $0$.

Therefore, $$\int_0^{\pi/2}\left(\frac\pi4-x\right)\log(\sin(x))\log(\cos(x))\,\mathrm{d}x=0\tag{2}$$ Using $(1)$ and $(2)$, we get \begin{align} \int_0^{\pi/2}x\log(\sin(x))\log(\cos(x))\,\mathrm{d}x &=\frac\pi4\int_0^{\pi/2}\log(\sin(x))\log(\cos(x))\,\mathrm{d}x\\ &=\frac\pi4\left(\frac\pi2\log(2)^2-\frac{\pi^3}{48}\right)\\ &=\frac{\pi^2}{8}\log(2)^2-\frac{\pi^4}{192}\tag{3} \end{align} We also have $$\int_0^{\pi/2}\left(\frac\pi4-x\right)^3\log(\sin(x))\log(\cos(x))\,\mathrm{d}x=0\tag{4}$$ Which, along with $(1)$ and $(3)$, implies that \begin{align} \int_0^{\pi/2}x^3\log(\sin(x))\log(\cos(x))\,\mathrm{d}x &=\frac{3\pi}{4}\int_0^{\pi/2}x^2\log(\sin(x))\log(\cos(x))\,\mathrm{d}x\\ &-\frac{3\pi^2}{16}\int_0^{\pi/2}x\log(\sin(x))\log(\cos(x))\,\mathrm{d}x\\ &+\frac{\pi^3}{64}\int_0^{\pi/2}\log(\sin(x))\log(\cos(x))\,\mathrm{d}x\\ &=\frac{3\pi}{4}\int_0^{\pi/2}x^2\log(\sin(x))\log(\cos(x))\,\mathrm{d}x\\ &-\frac{\pi^4}{64}\log(2)^2+\frac{\pi^6}{1536}\tag{5} \end{align} Equation $(5)$ supports math110's claim that if we know $I_2$, we know $I_3$.

• beatifull!,Thank you! Thank you Mar 15, 2013 at 15:41

Related problem: (I), (II). The contribution of this post is to evaluate the integral

$$I = \int_0^{\pi/2}\ln(\sin x)\ln(\cos x)dx$$

symbolically. Now to find $I$, we use the first change of variables $t = \sin(x)$ which results in

$$I = \frac{1}{2}\int_{0}^{1}\frac{\ln(t)\ln(1-t^2)}{\sqrt{1-t^2}}dt.$$

Following it by the change of variables $u=t^2$ gives

$$I = \frac{1}{8}\int_{0}^{1}\frac{ \ln(u) \ln(1-u) }{ \sqrt{u} \sqrt{1-u} } du .$$

To evaluate the last integral, we consider the integral

$$F = \frac{1}{8}\int_{0}^{1}u^{a-\frac{1}{2}} (1-u)^{b-\frac{1}{2}} du = \beta(a+1/2,b+1/2) ,$$

where $\beta(u,v)$ is the beta function.

$$\implies I = D_{b}\,D_{a} \beta(a+1/2,b+1/2)|_{a=0,b=0}= \frac{\pi}{48} \, \left( 24\, \left( \ln \left( 2 \right)\right)^{2} -{\pi }^{2} \right),$$

where $D_a=\frac{\partial }{\partial a}$ and $D_b=\frac{\partial }{\partial b}$.

• Too trivial edit: $dt$ is missing at the end of the second formula. Mar 19, 2013 at 1:51
• @MarkHurd: Thank you. I really appreciate it. Mar 31, 2013 at 12:30
• @MhenniBenghorbal Could you please explain how you used the Beta Function in the last step? I couldn't understand. Jun 4, 2015 at 11:40

First: Some reductions \begin{align} I&=\int_{0}^{\pi/2}x^{2}\, {\bracks{\ln\pars{\sin\pars{x}} + \ln\pars{\cos\pars{x}}}^{2} -\ln^{2}\pars{\sin\pars{x}} -\ln^{2}\pars{\cos\pars{x}} \over 2}\,\dd x \\[3mm]&=\half\int_{0}^{\pi/2}x^{2}\ln^{2}\pars{\sin\pars{x}\cos\pars{x}}\,\dd x -\half\int_{0}^{\pi/2}x^{2}\ln^{2}\pars{\sin\pars{x}}\,\dd x -\half\int_{0}^{\pi/2}x^{2}\ln^{2}\pars{\cos\pars{x}}\,\dd x \\[3mm]&=\half\int_{0}^{\pi/2}x^{2}\bracks{% \ln^{2}\pars{\sin\pars{2x}} - 2\ln\pars{2}\ln\pars{\sin\pars{2x}} + \ln^{2}\pars{2}} \,\dd x\\[3mm]& -\half\int_{0}^{\pi/2}x^{2}\ln^{2}\pars{\sin\pars{x}}\,\dd x -\half\int_{0}^{\pi/2}x^{2}\ln^{2}\pars{\cos\pars{x}} \,\dd x \\[3mm]&={\pi \over 4}\,\ln^{2}\pars{2} + {1 \over 16}\int_{0}^{\pi}x^{2}\ln^{2}\pars{\sin\pars{x}}\,\dd x - {1 \over 8}\ln\pars{2}\int_{0}^{\pi}x^{2}\ln\pars{\sin\pars{x}}\,\dd x \\[3mm]&-\half\int_{0}^{\pi/2}x^{2}\ln^{2}\pars{\sin\pars{x}}\,\dd x -\half\int_{0}^{\pi/2}x^{2}\ln^{2}\pars{\cos\pars{x}}\,\dd x \qquad\qquad\qquad\qquad\qquad\qquad\pars{1} \end{align}

Also, with $n = 1,2$: \begin{align} &\int_{0}^{\pi}x^{2}\ln^{n}\pars{\sin\pars{x}}\,\dd x= \int_{-\pi/2}^{\pi/2}\pars{x + {\pi \over 2}}^{2}\ln^{n}\pars{\cos\pars{x}}\,\dd x \\[3mm]&=\int_{0}^{\pi/2} \bracks{\pars{x + {\pi \over 2}}^{2} + \pars{-x + {\pi \over 2}}^{2}} \ln^{n}\pars{\cos\pars{x}}\,\dd x =\int_{0}^{\pi/2} \pars{2x^{2} + {\pi^{2} \over 2}}\ln^{n}\pars{\cos\pars{x}}\,\dd x \\[3mm]&=2\int_{0}^{\pi/2}x^{2}\ln^{n}\pars{\cos\pars{x}}\,\dd x + {\pi^{2} \over 2}\int_{0}^{\pi/2}\ln^{n}\pars{\cos\pars{x}}\,\dd x \end{align}

With this result, $\pars{1}$ is reduced to: \begin{align} I&={\pi \over 4}\,\ln^{2}\pars{2} -{3 \over 8}\int_{0}^{\pi/2}x^{2}\ln^{2}\pars{\cos\pars{x}}\,\dd x + {\pi^{2} \over 32}\ \overbrace{\int_{0}^{\pi/2}\ln^{2}\pars{\cos\pars{x}}\,\dd x} ^{\ds{{\pi^{3} \over 24} + {\pi \over 2}\,\ln^{2}\pars{2}}} \\[3mm]&-{1 \over 4}\,\ln\pars{2}\ \overbrace{\int_{0}^{\pi/2}x^{2}\ln\pars{\cos\pars{x}}\,\dd x} ^{\ds{-\,{\pi^{3} \over 24}\,\ln\pars{2} - {1 \over 4}\,\zeta\pars{3}}} -{\pi^{2} \over 16}\,\ln\pars{2}\ \overbrace{\int_{0}^{\pi/2}\ln\pars{\cos\pars{x}}\,\dd x} ^{\ds{-\,{\pi \over 2}\,\ln\pars{2}}} -\half\int_{0}^{\pi/2}x^{2}\ln^{2}\pars{\sin\pars{x}}\,\dd x \end{align}

$I$ is reduced to: $$I = C -\half\int_{0}^{\pi/2}x^{2}\ln^{2}\pars{\sin\pars{x}}\,\dd x -{3 \over 8}\int_{0}^{\pi/2}x^{2}\ln^{2}\pars{\cos\pars{x}}\,\dd x$$ where $C$ is given by: \begin{align} C &= {\pi \over 4}\,\ln^{2}\pars{2} + {\pi^{5} \over 728} + {\pi^{3} \over 64}\,\ln^{2}\pars{2} + {\pi^{3} \over 96}\,\ln^{2}\pars{2} + {1 \over 16}\,\ln\pars{2}\zeta\pars{3} + {\pi^{3} \over 32}\,\ln^{2}\pars{2} \\[3mm]&= {\pi \over 4}\,\bracks{\ln\pars{2} + {1 \over 4}\,\zeta\pars{3}}\ln\pars{2} + {\pi^{5} \over 728} + {1 \over 16}\,\ln\pars{2}\zeta\pars{3} + {11\pi^{3} \over 192}\,\ln^{2}\pars{2} \end{align} $\tt @sos440$ user had already derived results which are related to the remaining integrals.

• The first term of $C$ should be $\frac{\pi^3}{48}\ln^2(2)$. This little mistake came from integrating $\int_0^{\pi/2} \ln^2(2)dx$ instead of $\int_0^{\pi/2} \ln^2(2)x^2 dx$ Jun 13 at 23:00

Hint: Replace x by π/2- x

then simplify so we will get one term same as I

• When one writes Hint, one is asserting that the step which they indicate does lead to a proof. Yours does not.
– Did
Mar 14, 2013 at 6:59
• Let $$I_k = \int_{0}^{\frac{\pi}{2}} x^k \log \sin x \log \cos x, \, dx$$ for notation convenience. If we follow your hint, the resulting equation, after some cancellations, does not involve $I_2$. Rather, it can be used to find the relationship between $I_0$ and $I_1$. Mar 14, 2013 at 7:00
• This is clearly the crucial step. Mar 14, 2013 at 7:06
• hello,sos440,$I_{2}$ you can find value? Thank you ,I find if $I_{2}$ can evaluate,that we easy to find $I_{3}$ Mar 14, 2013 at 7:36
– Did
Feb 15, 2014 at 21:57

This is not quite a complete answer but goes a good way towards showing that the idea of @kalpeshmpopat is not so far off the mark - if we want to answer the question that was orginally asked.

First, numerical investigation indicates that the correct integral is

$$I=\displaystyle\int_0^{\pi/2}x\ln(\sin x)\ln(\cos x)dx=\dfrac{(\pi\ln{2})^2}{8}-\dfrac{\pi^4}{192}.$$

Now, as @kalpeshmpopat points out, a simple substitution, together with the facts that $\cos(\frac{\pi}{2}-x)=\sin(x)$ and vice-versa, shows that

$$\displaystyle\int_0^{\pi/2}x\ln(\sin x)\ln(\cos x)dx=\int_0^{\pi/2}(\frac{\pi}{2}-x)\ln(\sin x)\ln(\cos x)dx.$$

Thus, if we add these two together we get

$$\displaystyle\int_0^{\pi/2} \frac{\pi}{2} \ln(\sin x)\ln(\cos x)dx=2I.$$

All that remains to show is that

$$\displaystyle\int_0^{\pi/2} \frac{\pi}{2} \ln(\sin x)\ln(\cos x)dx = \frac{1}{96} \pi ^2 \left(6 \log ^2(4)-\pi^2\right),$$

which Mathematica can do. It's getting late, but my guess on this last integral would be to expand $\ln(\cos(x))$ into a power series (which is easy, since we know $\ln(1+y)$) and try to integrate $x^n \ln(\sin(x))$.

• Maybe you have realized this, but OP asks for an integral involving $x^2$, not the one you have worked on. OP also states that he may assume the value of a similar integral involving $x$, in case that helps in finding the answer. The question was always about the $x^2$-integral, but at first OP used the same name $I$ for both integrals, which was confusing. Mar 14, 2013 at 20:45
• @alex.jordan Clearly, the question currently asks for an integral involving $x^2$. However, it was edited by someone other than the OP, so I don't think it's necessarily clear what was asked. It wasn't confusing - it was unclear. Mar 14, 2013 at 20:50
• Hi Mark, do you know that you can see the complete edit history of a problem clicking the link displaying its last editor? Mar 14, 2013 at 20:58
• @alex.jordan Yes. Clearly, the OP is not a native speaker. He easily could have been asking for a verification of an integral whose value was known. Don't get me wrong, I think that Raghib's edit is a perfectly reasonable interpretation. Even so, the more interesting question, it seems to me, is why is the $p=0$ case true? It seems pretty clear given the answers that the substitution $x\rightarrow\pi/2-x$ yields a way to express $I(p)$ in terms of $I(q)$ using all integers $q<p$. Mar 14, 2013 at 21:05
• That substitution yields a way to express $I(p)$ in terms of $I(q)$ over $q<p$ when p is odd. Which is why it is not (immediately) helpful for $p=2$. Mar 14, 2013 at 21:11

I am going to continue @Felix answer above where he found

$$I = C-\frac12\int_0^{\pi/2}x^2\ln^2(\sin x)dx-\frac38\underbrace{\int_0^{\pi/2}x^2\ln^2(\cos x)dx}_{x\to \pi/2-x}$$

$$=C-\frac12\int_0^{\pi/2}x^2\ln^2(\sin x)dx-\frac38\int_0^{\pi/2}(\pi/2-x)^2\ln^2(\sin x)dx$$

$$=C-\int_0^{\pi/2}\left(\frac{7}{8}x^2-\frac{3\pi}{8}x+\frac{3\pi^2}{32}\right)\ln^2(\sin x)dx$$

Using

$$\ln^2(2\sin x)=\left(\frac{\pi}{2}-x\right)^2+2\sum_{n=1}^\infty\frac{H_{n-1}}{n}\cos(2nx),\quad 0

we have

$$\int_0^{\pi/2}\left(\frac{7}{8}x^2-\frac{3\pi}{8}x+\frac{3\pi^2}{32}\right)\ln^2(2\sin x)dx$$ $$=\int_0^{\pi/2}\left(\frac{\pi}{2}-x\right)^2\left(\frac{7}{8}x^2-\frac{3\pi}{8}x+\frac{3\pi^2}{32}\right)dx$$

$$+2\sum_{n=1}^\infty\frac{H_{n-1}}{n}\int_0^{\pi/2} \left(\frac{7}{8}x^2-\frac{3\pi}{8}x+\frac{3\pi^2}{32}\right)\cos(2nx)dx$$

$$=\frac{11\pi^5}{3840}+2\sum_{n=1}^\infty\frac{H_{n-1}}{n}\left(\frac{3\pi}{32 n^2}+\frac{(-1)^n \pi}{8n^2}\right)$$

$$=\frac{11\pi^5}{3840}+\frac{3\pi}{16}\sum_{n=1}^\infty\frac{H_{n-1}}{n^3}+\frac{\pi}{4}\sum_{n=1}^\infty\frac{(-1)^n H_{n-1}}{n^3}$$

$$=\frac{\pi}{2}\text{Li}_4(1/2)-\frac{7\pi^5}{2304}-\frac{\pi^3}{48}\ln^2(2)+\frac{7\pi}{16}\ln(2)\zeta(3)+\frac{\pi}{48}\ln^4(2).$$

What is remaining is to write $$\ln^2(2\sin x)=\ln^2(2)+2\ln(2)\ln(\sin x)+\ln^2(\sin x)$$ where the middle integral can be done using the Fourier series of $$\ln(\sin x)$$:

$$\int_0^{\pi/2}\left(\frac{7}{8}x^2-\frac{3\pi}{8}x+\frac{3\pi^2}{32}\right)\ln(\sin x)dx=-\frac{7\pi^3}{192}\ln(2).$$

Proof of (1): $$\begin{gather*} \sum_{n=1}^\infty(-1)^n\frac{H_{n-1}}{n}\cos(2nx)=\mathfrak{R}\sum_{n=1}^\infty(-1)^n\frac{H_{n-1}}{n}e^{2inx}\\ =\mathfrak{R}\sum_{n=1}^\infty\frac{H_{n-1}}{n}(-e^{2ix})^n\\ \{\text{replace x by -e^{2ix} in the generating function of \sum_{n=1}^\infty H_{n-1} x^n/n}\}\\ =\frac12\mathfrak{R}\ln^2(1+e^{2ix})\\ =\frac12\mathfrak{R}\left[\ln(2\cos x)+ix\right]^2\\ =\frac12\mathfrak{R}\left[\ln^2(2\cos x)+2ix\ln(2\cos x)-x^2\right]\\ =\frac12\ln^2(2\cos x)-\frac{x^2}{2}, \end{gather*}$$

replace $$x$$ by $$\frac{\pi}{2}-x$$ using $$(\cos(2n(\frac{\pi}{2}-x)))=(-1)^n\cos(2nx)$$ for integer $$n$$, we have

$$\ln^2(2\sin x)=\left(\frac{\pi}{2}-x\right)^2+2\sum_{n=1}^\infty\frac{H_{n-1}}{n}\cos(2nx),\quad 0


text:
# Why standard deviation of BLISS is so high?

In lattice based digital signature scheme BLISS why the standard deviation is so high (215) compared to the encryption schemes?

• do you have a reference for this? – b degnan Sep 2 '16 at 22:32
• you can look into this paper eprint.iacr.org/2013/383.pdf, page 24.The standard deviation is around 215. – Rick Sep 27 '16 at 8:26

I am assuming you are asking why the standard deviation in BLISS is high compared to that of the errors in encryption schemes. The answer is that the errors in encryption and the random variables with high standard deviation in BLISS (and other lattice signatures) play very different roles. In encryption, one simply needs to generate an error $e$ such that $(a,as+e)$ looks random. You don't need to have a high standard deviation at all for that.
In BLISS, the random variable $y$ that has a high standard deviation is used for masking the secret. In particular, a part of the signature is an element $z=y+sc$ where $s$ is a part of the secret and $c$ is the challenge. What is needed for security is that the distribution of $z$ is completely independent of $s$ -- this ensures that signatures do not leak the secret. The best way we know of how to do that is generate $y$ according to a discrete gaussian distribution of standard deviation proportional to $\|sc\|$ and then do rejection sampling. That is why in BLISS the $\sigma$ is of size proportional to $\|sc\|$.


text:
# Tag Info

130

It's common for games to have multiple overlapping loops of gameplay and reward, hitting different frequencies and motivation types, so that we don't have all our eggs in one basket, motivationally speaking. This helps the game appeal to more players, and more consistently appeal to any one player, since every player is a multifaceted human being with a ...

38

In any game where you have character leveling, you need to decide on a power curve. This is a mathematical function which maps game progress to character strength. This curve can be linear, polynomial or even exponential. The flatter the curve, the less progress your player will feel, but the easier it is to balance because early-game content still stays ...

34

In order to answer this question, we first need to consider why we have tech trees in the first place. They limit the complexity in the beginning of the game by hiding the more advanced game mechanics. This makes the game more accessible to beginners. They serve as a reward mechanic. Unlocking a new tech tree node gives the player a feeling of progression ...

34

When working out the maths and solving for the Level conditional on experience XP, we obtain: $$Level = \frac{1 + \sqrt{1 + 8 \times XP \div 50}}{2}$$ For example, what is the player's level for $XP = 300$? $$\frac{1 + \sqrt{1 + 8 \times 300 \div 50}}{2} = 4$$ As requested. Or, what is the level for XP = 100000? $$\frac{1 + \sqrt{1 + 8 \times ... 26 The simple and generic solution, if you don't need to repeat this calculation millions of times per second (and if you do, you're probably doing something wrong), is just to use a loop: expLeft = playerExp level = 1 while level < levelCap and expLeft >= 0: expLeft = expLeft - expToAdvanceFrom(level) level = level + 1 if expLeft < 0: level =... 23 It's a matter of motivating the player. The player has an achievable goal to work towards The player sees how far away from the goal they are The player sees how playing the game visibly progresses them towards the goal Variable ratio rewards can also be a great motivator, but so is an "honest pay for honest work" game mechanic where the reward after each ... 20 What you must worry about is the number of choices in the tech tree. In terms of a 4X game, lets say the depth of the tech tree is what affects how long a single play-through takes, while the width of the tech tree affects how many choices a player has each time they pick a new technology. The depth is determined by your game design, but the width should be ... 18 The best way to come to a conclusion in this regard is - like with most things in game development - to first think about how you want the game to play, and then make up the math which will result in the game playing like that. How long do you want the player to play on each level? In a story-focused single-player RPG you likely want to keep levelups as a ... 17 Don't forget to round the numbers after you figured out your curve. It doesn't make much sense to tell the player he needs 119,378 experience points to reach the next level — because the person would always understand it as "roughly 120,000". Thus you will be better off doing the rounding yourself, and presenting "clean" results to your players. For ... 11 The short answer: psychology. The long answer: We humans are driven by the expectation of a reward, just like a dog. Knowing how much experience you have reached and how much is still needed for reaching the next level gives you a nice feedback that what you do is good or bad for evolving your character. Edit: also, not knowing how long it will take for ... 11 Think about what would happen if level up happened randomly. You have a party of three players. At the beginning, all are the same level (for simplicity, 1). After playing around one levels and two don't. Not a huge deal normally. Since the one leveled, the others will level next and catch up. But under your system, the one who just leveled may level ... 11 @Philipp gave a great answer. Another concept to take into consideration is the idea of average threat level. It is perfectly acceptable for certain foes to have stats dramatically greater than what your curve predicts – so long as their other stats are lowered in proportion to the increase. For instance take pixies armed with envenomed needles. They are ... 11 The question has been answered with code, but I think it should be answered with math. Someone might want to understand instead of just copy and paste. Your system is easily described by a recurrence relation:$$ \text{XP}_{\text{Level}+1} = \text{XP}_{\text{Level}} + \text{Level} \cdot \text{Threshold}  Which offers a nice simple closed form solution ...

10

Here's one approach to solving the problem using basic algebra. If you don't care about the steps, skip to the bottom. An easy thing to come up with is, given a level n, the total experience e needed to obtain that level: e = sum from k=1 to n of (t(k-1)) The t term stands for the increase in XP needed per level - 50, in the example. We can solve the ...

9

You're better off trying to balance leveling as a function of time, rather than experience points, since experience points are meaningless outside the context of a particular game. Take your example. If it takes 100 times as long to earn experience in your game, you effectively end up with 2x as long a level grind to get to level 100 compared to Runescape. ...

7

There is actually a quite interesting GDC talk that has been given on this topic by someone who worked on the reward structures for large sections of World of Warcraft and Diablo 3: https://www.youtube.com/watch?v=urijgWXLYck He talked at length about how players experience randomized versus deterministic rewards and how both reward types work together to ...

4

TVTropes used to call this the "Kobayashi Mario", but now they just call it an Endless Game. The old name was a reference to the "Kobayashi Maru" test in the Star Trek universe. This is a test all starfleet cadetes have to take and which can not be completed successfully. The candidate can only fail, and the actual purpose of the test is to see how they ...

4

Jesse Schell's "Art of Game Design" has a good section on this subject. He uses this graph to illustrate the problem: The idea is that you need to keep a player's skills in balance with the challenges you give them. If the challenge is too low vs player skill, the player may get bored and stop playing your game. If it's too high, they may become frustrated/...

4

"Levelups" are a form of positive reinforcement. Positive reinforcement is used as a reward to motivate the player to perform a certain behavior, in your case to watch more videos and do more exercises. It's important for positive reinforcement to be applied soon after the player performs the desired behavior the first time. That means the first levelup ...

4

On each platform, keep the save game stored in a cloud storage system keyed to an id specific to that user (even before they’ve explicitly asked to save it in the cloud). For example, their Google Play player id on Android, or a guid that you generate and store in their iCloud account for iOS. Using their gmail account is a nonstarter if they don’t have a ...

4

When enemies scale with the player in a way that the game experience of fighting them stays exactly the same throughout the game, then the question is why you have player progression at all in your game. You are really fighting yourself here. If you want to retain player progression as a meaningful reward mechanic but without sacrificing the open world, ...

3

I think you should start from definition of the context: which kind of games? genre? single or multiplayer? In my experience as player and hobbyist, less options with meaningful effect into gameplay are desirable instead of a lot of options with few impact on gameplay. And keep in mind that presentation to player is a critical point. A huge (100+) tech tree ...

3

All the math involved here is very important to know for all sorts of reasons, some of them applicable to game development. BUT This is a game development site, not a math site. So let's discuss how these things work not as algorithmic series, but as sets, because that is the sort of math that applies to leveling in games you might actually develop to sell,...

3

A common solution for this is to have variables you save together with the players state and objects which have a conditional state depending on these variables. Example: When the player flips the switch on screen 42, you set the persistent variable "switch_42_state" to "flipped". On screen 76, you have a conditional door tile. When "switch_42_state" is "...

3

You might think about a leveling / XP / Skills system similar to the old Quest for Glory games. At the beginning of the game you choose your character class and are given a pool of points to distribute. You can spend extra points to get skills that your character class would not normally have (giving a mage lock picking ability, or a fighter the ability to ...

3

Consider Time You first need to figure out how the rate of experience gain scales with level. Then you can tailor your leveling by time required. If every additional level allows you to gain experience twice as fast, and you need twice as much experience to level, every level will require the same amount of time. My suggestion is to think about how much ...

3

Not boring Not having to select research and wait for it to complete over a period of time Well, science actually does take time when it comes to Research & Development in real life. Therefore, the player expects time shall pass between the beginning of a research and its final results, be it a couple of minutes or a whole day. At the same time, ...

2

Difficulty is perceived as a combination of time, risk, and meaningful choice. RPGs usually start off with small encounters that are very quick, have little risk, and little meaningful choice. This continues while the player is learning the game and the character they are playing. As new abilities are introduced, more meaningful choice is introduced. Do you ...

2

TL;DR People are impatient. More randomness tends to make games more difficult. As you have pointed out, it's been scientifically proven that many species find variable ratio setups 'irresistible'. This is because they appeal to a very primitive part of the brain, and assuming that the individual judges risk/reward ratios correctly, it's actually a really ...

2

I don't have novel ideas for you. I'll suggest some ideas lifted from other games, combined and adapted. You could have the player discover recipes/blueprints via experimentation. You would have machines that let you transform or combine resources, and if you guess the right combination, you discover a recipe/blueprint. Thus, the recipes/blueprints you have ...

Only top voted, non community-wiki answers of a minimum length are eligible