Recycler View below Recycler View, but not after half

Question: I want to have a page with two lists (RecyclerView) each with a header (TextView) one starting after the end of the previous. But I want each to have a maximum of half the page. So in a case where the first list has one item, the second list will be placed directly under, if the first list is long it will only take up half the page and the second list will start from the second half.This is for if I want each to always take up half
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="match_parent"
  android:layout_height="match_parent">

<android.support.v7.widget.RecyclerView
    android:id="@+id/list_one"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1"/>

<android.support.v7.widget.RecyclerView
    android:id="@+id/list_two"
    android:layout_width="match_parent"
    android:layout_height="0dp"
    android:layout_weight="1"/>
</LinearLayout>

Comment: You can't make a recycler wrap on its content. As the scroll behaviour is determined whether the content size is major than the recycler view size
Answer: Try this one
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:fillViewport="true">

<LinearLayout
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:orientation="vertical" >

<TextView
    android:layout_width="match_parent"
    android:layout_height="@dimen/list_header"
    android:background="@color/header"
    android:gravity="center"
    android:text="@string/find_friends__already_playing"
    android:visibility="visible" />

<android.support.v7.widget.RecyclerView
    android:id="@+id/in_app_friends"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginBottom="5dp"
    android:background="@color/white"/>

<TextView
    android:layout_width="match_parent"
    android:layout_height="@dimen/list_header"
    android:background="@color/find_friends__header"
    android:gravity="center"
    android:text="@string/find_friends__invite_friends" />

<android.support.v7.widget.RecyclerView
    android:id="@+id/friends_to_invite"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/white"/>
</LinearLayout>
</ScrollView>


How to create the edit form in Silverstripe 4.2 frontend?

Question: I wish to create the edit form in Silverstripe 4.2, much like this Stack Overflow's edit function that i'm looking for.
EDITED: I want to be able to have a page that is only available to the registered member of my website that they can post their class listings on the Frontend (not in CMS) as an owner, and need to have a 'edit' click that takes you to an identical form (same ClassListingForm) that lets member owner to edit/update their own class listings that they have posted. I have everything working except the edit and submit functions which I'm stuck on at the moment.
I have a link for editing the specific class listing:
Edit class listing

It does redirected to 404 page not found with this url shown:
"http://.../learners/class-listings/edit/61"
Here's the code below I have so far, the ClassListingForm is working fine, just need to get the EditListingForm and doClassListing functions to work properly, and i may be doing something wrong in these codes? or is there a better way of doing the edit form properly which i'm unable to find anywhere on the search for specific on what i need as there's not much tutorial that covers the EditForm function on the SilverStripe lessons.
<?php

class ClassListings extends DataObject {

    private static $table_name = 'ClassListings';

    private static $db = [
        'CourseTitle' => 'Varchar(255)',
        'CourseLocation' => 'Varchar(255)',
    ];

    private static $has_one = [
        'ClassListingPage' => ClassListingPage::class,
    ];
}

<?php

class ClassListingPageController extends PageController {

        private static $allowed_actions = [
            'ClassListingForm',
            'ClassEditForm'
        ];

        public function ClassListingForm() {

            $id = (int)$this->urlParams['ID'];
            $data = ($id)? $data = ClassListings::get()->byID($id) : false;

            $form = Form::create(
              $this,
              __FUNCTION__,
              FieldList::create(
                TextField::create('CourseTitle', 'Course title:')
                    ->setAttribute('placeholder', 'NZSL Level 1, NZSL 1A')
                    ->setCustomValidationMessage('Please enter the course title field')
                    ->addExtraClass('requiredField CourseTitle'),
                TextField::create('CourseLocation','Region:')
                    ->setAttribute('placeholder', 'Enter region')
                    ->setCustomValidationMessage('Please enter the region field')
                    ->addExtraClass('requiredField'),
                HiddenField::create('ID', 'ID')->setValue($ClassListingPageID)
              ),
              FieldList::create(
                  FormAction::create('handleClassListing')
                      ->setTitle('Post your class listing')
                      ->addExtraClass('btn btn-primary primary')
              ),
              RequiredFields::create(
                'CourseTitle',
                'CourseLocation'
              )
          );

          $form->loadDataFrom(Member::get()->byID(Member::currentUserID()));
          $form->getSecurityToken()->getValue();

                    if ($form->hasExtension('FormSpamProtectionExtension')) {
                $form->enableSpamProtection();
            }

                    $data = $this->getRequest()->getSession()->get("FormData.{$form->getName()}.data");
                    return $data ? $form->loadDataFrom($data) : $form;
          }

          public function handleClassListing($data, $form) {

                $session = $this->getRequest()->getSession();
                $session->set("FormData.{$form->getName()}.data", $data);
                $class = ClassListings::create($this->owner);

                $class->CourseTitle = $data['CourseTitle'];
                $class->CourseLocation = $data['CourseLocation'];
                $class->ID = $data['ID'];

                $class->ClassListingPageID = $this->ID;
                $form->saveInto($class);
                $class->write();

                $session->clear("FormData.{$form->getName()}.data");
                $form->sessionMessage('Your class listing has been posted!','good');
                $session = $this->getRequest()->getSession();

                return $this->redirect($this->Link());
            }

            public function ClassEditForm() {

                $ClassListingPageID = (int)$this->urlParams['ID'];
                $data = ($ClassListingPageID)? $data = ClassListings::get()->byID($ClassListingPageID) : false;
                $var = $this->getRequest()->getVar('$data');

                    if($var){
                        $form = Form::create(
                                    $this,
                                __FUNCTION__,
                                FieldList::create(
                                        TextField::create('CourseTitle', 'Course title:')
                                            ->setAttribute('placeholder', 'NZSL Level 1, NZSL 1A')
                                            ->setCustomValidationMessage('Please enter the course title field')
                                            ->addExtraClass('requiredField CourseTitle'),
                                        TextField::create('CourseLocation','Region:')
                                            ->setAttribute('placeholder', 'Enter region')
                                            ->setCustomValidationMessage('Please enter the region field')
                                            ->addExtraClass('requiredField'),
                                        HiddenField::create('ID', 'ID')->setValue($ClassListingPageID)
                                ),
                                FieldList::create(
                                        FormAction::create('doClassListing')
                                                ->setTitle('Post your class listing')
                                                ->addExtraClass('btn btn-primary primary')
                                ),
                                RequiredFields::create(
                                        'CourseTitle',
                                        'CourseLocation',
                                )
                        );

                        $form->loadDataFrom(ClassListings::get()->filter(['ClassListingPageID' => $var])[0]);
                        $form->getSecurityToken()->getValue();

                        if ($form->hasExtension('FormSpamProtectionExtension')) {
                                $form->enableSpamProtection();
                        }

                        $data = $this->getRequest()->getSession()->get("FormData.{$form->getName()}.data");
                        return $data ? $form->loadDataFrom($data) : $form;
                    }
                    return;
            }

      public function doUpdateClassListing($data, Form $form) {

                $session = $this->getRequest()->getSession();
                $session->set("FormData.{$form->getName()}.data", $data);
                $class = ClassListings::create($this->owner);

                $class->CourseTitle = $data['CourseTitle'];
                $class->CourseLocation = $data['CourseLocation'];
                $class->ID = $data['ID'];

                $class->ClassListingPageID = $this->ID;
                $form->saveInto($class);
                $class->write();

                $session->clear("FormData.{$form->getName()}.data");
                $form->sessionMessage('Your class listing has been updated!','good');
                $session = $this->getRequest()->getSession();

            return $this->redirect($this->Link());

      }
}

Comment: Do let me know if the title/topic is not correct for this post, then let me know what's the proper title for this. :D
Comment: What does not work about the 'edit' and 'submit' parts of your work? It may help to be more specific about this, so that readers can understand the nature of your problem.
Comment: @halfer i've updated/edited above on this post with extra specific. hope that is enough. Do let me know if need more.
Comment: OK. What should the URL be instead of the one that is rendered?
Comment: The url is correct for http://.../learners/class-listings/edit/61 as i mentioned in the post, but the issue is i'm getting 404 error page which i don't understand why.
Answer: Thought i post this answer to share in case if others have the same issue i had.
Finally got it working and solved the issue now, have replaced whole the codes for both ClassEditForm and doUpdateClassListing methods, and also created another funcation called Edit:
public function Edit(HTTPRequest $request) {
    $id = (int)$request->param('ID');
    $class = ClassListings::get()->byID($id);
    if (!$class || !$class->exists()) {
         return ErrorPage::response_for(404);
    }
    $form = $this->ClassEditForm($class);
    $return = $this->customise(array(
         'Title' => 'Edit: ' . $class->CourseTitle,
         'Form' => $form,
    ));

    return $return = $return->renderWith(array('ClassListingPage_edit', 'Page'));
}

public function ClassEditForm() {

        $id = (int)$this->urlParams['ID'];
        $class = ClassListings::get()->byID($id);

        $fields = new FieldList(
            HiddenField::create('ID')->setValue($id),
            TextField::create('CourseTitle', 'Course title:')
                ->setAttribute('placeholder', 'NZSL Level 1, NZSL 1A')
                ->setCustomValidationMessage('Please enter the course title field')
                ->addExtraClass('requiredField CourseTitle'),
            TextField::create('CourseLocation','Region:')
                ->setAttribute('placeholder', 'Enter region')
                ->setCustomValidationMessage('Please enter the region field')
                ->addExtraClass('requiredField')
          );
          $actions = new FieldList(
              FormAction::create('doUpdateClassListing')
                ->setTitle('Update your class listing')
                ->addExtraClass('btn btn-primary primary')
          );
          $validator = new RequiredFields([
              'CourseTitle',
              'CourseLocation'
          ]);

        $form = Form::create($this, 'ClassEditForm', $fields, $actions, $validator);

        if ($class) $form->loadDataFrom($class);

        return $form;
}

public function doUpdateClassListing($data, Form $form) {

           if($data['ID']){
               $id = $data['ID'];
               $class = ClassListings::get()->byID($id);
           } else {
               $class = ClassListings::create();
           }

           $form->saveInto($class);
           $id = $class->write();
           $form->sessionMessage('Your class listing has been updated!','good');

           $this->redirect($this->Link() . "edit/".$id);
       }


O que é uma variável escalar?

Question: Estava lendo a documentação do PHP e uma função is_scalar() - como dito pelo próprio site - quando for utilizada irá informar se uma determinada variável é escalar. Entretanto queria saber um pouco mais sobre essas variáveis escalares:

O que é uma variável escalar?
Como funciona uma variável escalar?
Qual a diferença entre uma variável escalar e uma não escalar?
Quais os tipos de variáveis que são escalares?
Answer: A resposta mais simples é que esse termo, que é usado não só com PHP mas como a maioria das linguagens existentes, vem da álgebra linear.
Em álgebra linear, dizemos que um valor é escalar para denotar um número ou valor simples, e não uma estrutura algébrica. Falar sobre as estruturas algébricas em si seria meio que desviar do assunto, então para os curiosos vou apenas deixar um link para a wiki correspondente da Estrutura algébrica.
Já em programação, uma variável é escalar se ela for um número, uma string ou outro tipo dos ditos "primitivos" em várias linguagens - que é distinto de uma estrutura com mais lógica e conjunto de operações implícitos como uma instância de uma classe ou um array. E sim, eu sei que strings são no fundo arrays de caracteres, mas recebem tratamento especial em quase toda linguagem.
Answer: Uma variável escalar é um valor simples como um int, float, string, boolean. Esse tipo pode ser acessado/manipulado sem nenhuma instrução adicional, basta chamá-lo, diferente de um array ou algum outro que você tem de especificar o elemento ou chave.
Tipos não escalares são compostos ou seja precisam de algo a mais para serem manipulados como objetos, arrays e resources.
Um exemplo de erro (notice no caso) bem comum é tentar imprimir um tipo composto:
$arr = array('nome' => 'Fulano');
echo $arr; // Notice: Array to string conversion

//O correto seria especificar qual elemento do array deseja manipular. Por exemplo:
echo $arr['nome'];

Answer: Resolvi responder porque considero as respostas atuais parcialmente erradas. Elas estão certas em certo contexto. Mas estar certo em uma reunião de terraplanistas não ajuda muito.
O que eu quero dizer, para a ira de alguns, é que PHP tem problemas desde sua concepção até a documentação. Então se olhar a documentação da linguagem isso até se encaixa bem. Mas essa definição me parece errada. Especialmente quando se tenta usar uma definição comparando com a matemática que diz o oposto do respondido.
A documentação não usa o termo em lugar algum mais, só na função descrita.
Para mais detalhes eu já respondi em Escalar, primitivo, nativo ou atômico ou por valor, é tudo a mesma coisa?.
Em resumo, o tipo escalar é aquele de valores simples que determinam uma quantidade, uma escala de valores em um vetor de unidades. Ele é uma unidade de medida.
Esta definição exclui strings, e até, mais polemicamente, o booleano.
Sob alguma definição um tipo Datetime seria um escalar. Semanticamente é, mas há dois problemas. Por ser um tipo por referência, em alguma definição, pode não ser mais escalar. E o tipo realmente é object e não DateTime. PHP não cria tipos de verdade. Embora isso seja mais complicado de analisar.
Pra mim somente int e float são tipos escalares em PHP, mesmo que a função diga o contrário. Mas para efeito do uso dela, considere o que está na documentação.
Existe um problema até mesmo na pergunta (não culpa dela, é do PHP), já que ela fala de variável escalar. O que pode ser escalar é o dado. Especialmente em PHP, uma linguagem de tipagem  dinâmica e fraca, a variável não tem tipo (até tem um único, mas não vou entrar nesta questão, não é pertinente aqui). Então a função dita indica se o valor da variável é escalar ou não.
Curiosamente o rray fala de algo que me chamou a atenção. Para definir o que é escalar, primitivo ou algo assim podemos olhar para o resultado do toString()  (ou algo parecido) que algumas linguagens possuem. Se ela der um resultado significativo então, talvez, dê para chamar de escalar, ou quem sabe de primitivo. Não estou dizendo que esta definição é boa, mas é uma forma de observar. Ela é falha no sentido de que alguém pode criar um tipo que tenha representação textual significativa e não ser nada disso. Talvez posso ser usado com condições adicionais.
Conclusão: não é fácil usar o termo adequadamente.
Eu votei nas respostas (e pergunta), agora não sei se deveria :) Elas não usam claramente a definição de PHP, e sim algo geral para programação, isto claramente está errado, embora a resposta não aceita dá margem para interpretar só como PHP.

O que é uma variável escalar?


What am I given my vocal range?

Question: I'm looking for help here, Am I a Baritone? My current vocal range is A3 the lowest I can go, and a I can hit up to F5, If I go to G5 I start getting a falsetto.
What am I?
Comment: If you are looking for your voice classification more information than your "range" is needed. You voice is classified based on things like your comfortable area, where your bridges(where you transition between your voices) and the texture of your voice.
Comment: This question has been answered numerous times in the past. Use the search... http://music.stackexchange.com/search?q=What+is+my+voice
Comment: See also http://music.stackexchange.com/q/8063/28
Answer: If your last register change is at G5, you are likely a coloratura soprano.
If A3 is the lowest you can go as a male, you should wait for puberty or visit a doctor.  This is a note female altos are expected to reach convincingly, and most sopranos should at least be able to reach them.
I suspect that you don't realize that tenor notes are usually written an octave higher than sung.
At any rate, the notes at which you can make noises while untrained are of rather little relevance for determining the range you can control with a trained voice to the delight of an audience, and the latter is what determines your voice type.

What am I given my vocal range?


Example of a non-Cauchy sequence

Question: Give an example of a sequence $\{x_n\}$ in $\Bbb R$ such that for every $k\in\Bbb N$ we have $\displaystyle \lim_{n\to\infty}(x_{n+k}-x_n) = 0$ but $\{x_n\}$ is not a Cauchy sequence.
I think I should use a slowly increasing function, but don't know if I'm correct.
Comment: [The second paragraph?](https://en.wikipedia.org/wiki/Cauchy_sequence)
Answer: The example that first comes to mind is the harmonic series
$$x_n = \sum_{m=1}^n \frac{1}{m}$$
It is well known that this series is divergent (for example, see here), but
$$x_{n+k} - x_n = \sum_{m=n+1}^{n+k} \frac{1}{m} < \sum_{m=n+1}^{n+k} \frac{1}{n+1} = \frac{k}{n}$$
which goes to $0$ as $n \to \infty$.

A simpler example is $x_n = \ln n$. The natural log is unbounded, but
$$x_{n+k} - x_n = \ln(n+k) - \ln(k) = \ln\left(\frac{n+k}{n}\right)$$
which goes to $\ln(1) = 0$ as $n \to \infty$.
Comment: +1 for $x_n=\ln(n)$. You should add some more detail, though.
Comment: @AlexS I've expanded it a bit.
Comment: Thanks, I also showed that is not Cauchy.
Answer: The sequence may even by bounded: Try $x_n=\sin\sqrt n$.

Example of a non-Cauchy sequence


Synchronize server directory with local directory FileZilla?

Question: I have uploaded a website online and had to make some hotfixes directly on the server directories, but now there is a discrepancy between my local directory and the server directory.
I tried to navigate FileZilla settings to check if there is a way to synchronize the files between the server dir and local dir (or vise versa) but could not get to a way this could be done with FileZilla.
Is there a workaround to achieve this with FileZilla without any other extensions/plugins? What could be the best way to do this knowing that I'm on windows machine?
Comment: Anyway, see [FileZilla - How to synchronize two-way (newest file wins)?](http://superuser.com/q/935353/213663)
Comment: Ok noted, thanks for your answer @MartinPrikryl, beneficial.
Answer: This doesn't meet your specific requirements of the answer having to be FileZilla, but if you don't get such an answer, I'd recommend using WinSCP to do this.  I think some of its FTP functionality is actually based on FileZilla, and it has a powerful sync feature that has preview functionality that will let you see what's going to happen before it does the sync, and you can choose to sync or not sync individual files from that preview if you want to customize the operation further.  You can read more about its sync at https://winscp.net/eng/docs/task_synchronize_full, though it's pretty self-explanatory.  You access it from the Commands -> Synchronize menu option.


Extract data from JSON API

Question: I need to modify a software.
I need to extract the "price" data from this, how can i do?
{
  "result": {
    "stats": [
      {
        "profitability_above_ltc": "0",
        "price": "1.8266",
        "profitability_ltc": "0",
        "algo": 0,
        "speed": "14266.85620849"
      },
      {
        "price": "0.081",
        "profitability_btc": "0",
        "profitability_above_btc": "0",
        "algo": 1,
        "speed": "385908261.68241924"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0",
        "profitability_ltc": "0",
        "algo": 2,
        "speed": "0"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.0298",
        "profitability_ltc": "0",
        "algo": 3,
        "speed": "595530.02421524"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.0003",
        "profitability_ltc": "0",
        "algo": 4,
        "speed": "2611.90080988"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.1404",
        "profitability_ltc": "0",
        "algo": 5,
        "speed": "2260.49880031"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.0003",
        "profitability_ltc": "0",
        "algo": 6,
        "speed": "1050.4786522"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.0031",
        "profitability_ltc": "0",
        "algo": 7,
        "speed": "2467.60173312"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.1354",
        "profitability_ltc": "0",
        "algo": 8,
        "speed": "42.42055349"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.0001",
        "profitability_ltc": "0",
        "algo": 9,
        "speed": "0.05507848"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0",
        "profitability_ltc": "0",
        "algo": 10,
        "speed": "0"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.1721",
        "profitability_ltc": "0",
        "algo": 11,
        "speed": "1676.32988734"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.209",
        "profitability_ltc": "0",
        "algo": 12,
        "speed": "29233.19588795"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0",
        "profitability_ltc": "0",
        "algo": 13,
        "speed": "0"
      },
      {
        "profitability_above_ltc": "0",
        "price": "3.72",
        "profitability_ltc": "0",
        "algo": 14,
        "speed": "4429.92289544"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0",
        "profitability_ltc": "0",
        "algo": 15,
        "speed": "0"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.0057",
        "profitability_ltc": "0",
        "algo": 16,
        "speed": "1374.37104"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0",
        "profitability_ltc": "0",
        "algo": 17,
        "speed": "0"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0",
        "profitability_ltc": "0",
        "algo": 18,
        "speed": "0"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.0001",
        "profitability_ltc": "0",
        "algo": 19,
        "speed": "0.00016779"
      },
      {
        "price": "0.0059",
        "algo": 20,
        "speed": "8824.36047254",
        "profitability_eth": "0",
        "profitability_above_eth": "0"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.0187",
        "profitability_ltc": "0",
        "algo": 21,
        "speed": "370612.8438268"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.1729",
        "profitability_ltc": "0",
        "algo": 22,
        "speed": "0.1064621"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.0612",
        "profitability_ltc": "0",
        "algo": 23,
        "speed": "36146.26380671"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.3499",
        "profitability_ltc": "0",
        "algo": 24,
        "speed": "0.10152039"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.05",
        "profitability_ltc": "0",
        "algo": 25,
        "speed": "26332.59479137"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.0054",
        "profitability_ltc": "0",
        "algo": 26,
        "speed": "3.70231186"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.0049",
        "profitability_ltc": "0",
        "algo": 27,
        "speed": "7123.4766245"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0",
        "profitability_ltc": "0",
        "algo": 28,
        "speed": "0"
      },
      {
        "profitability_above_ltc": "0",
        "price": "0.0043",
        "profitability_ltc": "0",
        "algo": 29,
        "speed": "16.33657586"
      }
    ]
  },
  "method": "stats.global.current"
}

Comment: Possible duplicate of [How can I parse JSON with C#?](https://stackoverflow.com/questions/6620165/how-can-i-parse-json-with-c)
Comment: What is the existing code? What have you attempted?
Comment: First, you need to try
Answer: Use Json.NET (Newtonsoft.Json NuGet package).
public class Stat
{
    public string profitability_above_ltc { get; set; }
    public string price { get; set; }
    public string profitability_ltc { get; set; }
    public int algo { get; set; }
    public string speed { get; set; }
    public string profitability_btc { get; set; }
    public string profitability_above_btc { get; set; }
    public string profitability_eth { get; set; }
    public string profitability_above_eth { get; set; }
}

public class Result
{
    public List<Stat> stats { get; set; }
}

public class RootObject
{
    public Result result { get; set; }
    public string method { get; set; }
}

var json = new WebClient().DownloadString("url");

RootObject deserializedProduct = JsonConvert.DeserializeObject<RootObject>(json);

//deserializedProduct.Result[i].price  <-- this is what you want.

Comment: And where i put the http url from where i get the json data?
Comment: Ok, so the code is this:
public class HandlerClass
{
    public class Stat    {..}
    public class Result    {..}
    public class RootObject {..}
       public static void HandleOrder(ref Order OrderStats, ref double MaxPrice, ref double NewLimit)
       { var json = new WebClient().DownloadString("url");
        if (json == null) return;
 RootObject deserializedProduct = JsonConvert.DeserializeObject(json);
        double nprice = deserializedProduct.Result[20].price;
MaxPrice = nprice;
}}
But i get an error on the definiction of Result in HandlerClass.RootObject
Answer: Use Json.Net. Write a class that repsresents a model and use
JsonConvert.DeserializeObject<MyModel>(json);

If needed use inheritance and composition to build powerful model if needed.
there are also other libraries depending on what you want achieve.
Answer: Follow the steps:

Install Newtonsoft json nuget package to you project.
(https://www.nuget.org/packages/newtonsoft.json/)
Convert JSON response (string) to relative classes (http://json2csharp.com/ )
public class Stat
{
    public string profitability_above_ltc { get; set; }
    public string price { get; set; }
    public string profitability_ltc { get; set; }
    public int algo { get; set; }
    public string speed { get; set; }
    public string profitability_btc { get; set; }
    public string profitability_above_btc { get; set; }
    public string profitability_eth { get; set; }
    public string profitability_above_eth { get; set; }
}
public class Result
{
    public List stats { get; set; }
}
public class RootObject
{
    public Result result { get; set; }
    public string method { get; set; }
}
Deserialize json string
RootObject Product = JsonConvert.DeserializeObject(jsonString);
Loop through data
Product.Result[i].price  <=this is what you want

Extract data from JSON API


A question in proof theorem 12.9 of Tom M Apostol ( Mathematical Analysis)

Question: While self studying Mathematical Analysis from Tom M Apostol, I am unable to deduce a statement in following proof :

Question: I am unable to deduce how to prove existance of $\delta$  such that x+tu belongs to S  for all real t in that interval in line 1.

I tried using defination of L(x, y) and that L(x, y) belongs to S and also putting  u = x-y in defination of L(x, y)  but couldn't prove it .
Any help please.
Answer: Hint: for $0 \leq t \leq 1$ we have $x+tu=x+t(y-x)=ty+(1-t) x$. This lies in $L(x,y) \subseteq S$. Now, for $-\delta <t<0$ we have $|(x+tu) -x|\leq \delta |y-x|$. Since $x \in S$  and $S$ is open it follows that $x+tu \in S$ provided $\delta >0$ is sufficiently small. A similar argument works for  $1 <t <1+\delta$.
You have to choose $\delta$ such that $B(x,\delta |y-x|) \subset S$ and $B(y,\delta |y-x|) \subset S$
Comment: @user795826 MVT applied to $t \to f(ty+(1-t)x)$ shows that $f(y)-f(x)=f'(z)(y-x)$ for some $z$. Hence $\|f(y)-f(x)\| = \|f'(z)(y-x)\|$. I don't think C-S inequality is required here. But you can use C-S inequality to see that $\|f(y)-f(x)\| = \|f'(z)\| \|(y-x)\|$.
Comment: just after this section Apostol gave some examples, in one of the examples he wrote that if we apply Cauchy Schwartz inequality to ( 23) with ||a||=1 , we will get -> ||f(y) -f(x) || $\leq$ || f'(z) (y-x) || . But I am unable to understand how Cauchy Schwartz inequality yields this? I don't think this question should be asked separately, so I am asking you here. Can you please tell
Comment: I think you didn't covered the case when 0< $\delta$ <1 ?
Comment: @user795826 We are suposed to prove the inequality for $-\delta <t <1+\delta$ and I am splitting the proof into the cases $-\delta <t <0, 0 \leq t \leq 1$ and $1<t<1+\delta$. That covers all cases.
Comment: I got it!! Thanks!!
Comment: can you please answer the question asked in 1 st comment? Or you think I should ask it separately.
Comment: Ok, I was thinking the same. Thank you!!
Comment: There is another question about Lebesgue Measure which no one has answered. If you are interested and have some spare time can you please help me with that?   https://math.stackexchange.com/questions/3732610/proof-of-countable-additive-property-of-lebesgue-integrable-functions


PowerShell: compare 2 large CSV files to find users that don't exist in one of them

Question: I have 2 csv files with ~10,000 users each. I need to count how many users appear in csv1 and not in csv2. At the moment I have the code below. However I'm aware that this is probably extremely inefficient as it is potentially looping through up to 10,000 users 10,000 times. The code takes forever to run and I'm sure there must be a more efficient way. Any help or suggestions are appreciated I am fairly new to Powershell
foreach ($csv1User in $csv1) {
        $found = $false
        foreach ($csv2User in $csv2) {
            if ($csv1User.identifier -eq $csv2User.identifier)
            {
                $found = $true
                break
            }
        }
        if ($found -ne $true){
            $count++
        }
    }

Comment: Make a hashtable of the names in one csv.
Comment: Your question isn't clear in what your input looks like and what you actually expect for output. Anyways, you might want to stream one csv file (to save memory) and index the other (using a hash table). In case you do not want to reinvent the wheel, you might try this [`Join-Object`](https://www.powershellgallery.com/packages/Join) cmdlet (see also: [what's the best way to join two tables into one?](https://stackoverflow.com/a/45483110/1701026)): `Import-Csv .\csv1.csv | FullJoin (Import-Csv .\csv2.csv) -On identifier -Discern csv1,csv2 | Export-Csv .\Overview.csv`
Answer: If you replace your nested loops with 2 HashSet's, you'll have two ways of calculating the exception between the two:
Using SymmetricExceptWith()
The HashSet<T>.SymmetricExceptWith() function allows us to calculate the subset of terms that exist in either collection but not in both:
# Create hashset from one list
$userIDs = [System.Collections.Generic.HashSet[string]]::new([string[]]$csv1.identifier)

# Pass the other list to `SymmetricExceptWith`
$userIDs.SymmetricExceptWith([string[]]$csv2.identifier)

# Now we have an efficient filter!
$relevantRecords = @($csv1;$csv2) |Where-Object { $userIDs.Contains($_.identifier) } |Sort-Object -Unique identifier

Using a sets to track duplicates
Similarly we can use hash sets to keep track of which terms that have been observed at least once, and which ones has been seen more than once:
# Create sets for tracking
$seenOnce = [System.Collections.Generic.HashSet[string]]::new()
$seenTwice = [System.Collections.Generic.HashSet[string]]::new()

# Loop through whole superset of records
foreach($record in @($csv1;$csv2)){
  # Always attempt to add to the $seenOnce set
  if(!$seenOnce.Add($record.identifier)){
    # We've already seen this identifier once, add it to $seenTwice
    [void]$seenTwice.Add($record.identifier)
  }
}

# Just like the previous example, we now have an efficient filter!
$relevantRecords = @($csv1;$csv2) |Where-Object { $seenOnce.Contains($_.identifier) -and -not $seenTwice.Contains($_.identifier) } |Sort-Object -Unique identifier

Using a hash table as a grouping construct
You could also use a dictionary type (like a [hashtable] for example) to group records from both csv files based on their identifier, and then filter on number of record values in each dictionary entry:
# Groups records on their identifier value
$groupsById = @{}
foreach($record in @($csv1;$csv2)){
  if(-not $groupsById.ContainsKey($record.identifier)){
    $groupsById[$record.identifier] = @()
  }
  $groupsById[$record.identifier] += $record
}

# Filter based on number of records with a distinct identifier
$relevantRecords = $groupsById.GetEnumerator() |Where-Object { $_.Value.Count -eq 1 } |Select-Object -Expand Value

Answer: If you're just looking for the count then this should be much faster.
$csv2 = Import-Csv $csvfile2

Import-Csv $csvfile1 |
    Where-Object identifier -in $csv2.identifier |
        Measure-Object | Select-Object -ExpandProperty Count

Here's a small example
$csvfile1 = New-TemporaryFile
$csvfile2 = New-TemporaryFile

@'
identifier
bob
sally
john
sue
'@ | Set-Content $csvfile1 -Encoding UTF8

@'
identifier
bill
sally
john
stan
'@ | Set-Content $csvfile2 -Encoding UTF8

$csv2 = Import-Csv $csvfile2

Import-Csv $csvfile1 |
    Where-Object identifier -in $csv2.identifier |
        Measure-Object | Select-Object -ExpandProperty Count

Output is simply
2


How do I install my own fonts on Nodejs Server?

Question: I am using Nodejs. All is good.
My designer wants the webpages to use the 'Proximanova' font, which is a non-standard font.
He has provided me the OTF files for the same font.
How do I go about using this custom font on the server?
I checked out a few node font packages, like FTPM and connect-font, but it wasn't clear if I could do this. FTPM depends on Google fonts, but I want to use my locally hosted fonts.
If this can't be done directly, what would you recommend?
Answer: A: Font Assets
Ensure that you have a license to use said font on the server.

If you don't have permission/license for the font, then you should look into it, or a suitable alternative.  Google Fonts and Font Squirrel are two great resources

Check to see if there is an existing entry for said font on a CDN (Such as Google Fonts)

If there is a common CDN entry available, then use that.

If no CDN is available, generate the necessary web fonts via the FontSquirrel Generator

This will give you a zip file with the various font formats and a sample CSS to use.  From here, you'll want to host said fonts in your application.

B: Hosting in Node.JS
Assuming you are using ExpressJS, you'll want to use the express.static middleware in order to serve up a directory with your static content (ex: css, js, fonts)
for example:
// GET /static/javascripts/jquery.js
// GET /static/style.css
// GET /static/favicon.ico
app.use('/static', express.static(__dirname + '/public'));

C: Other Notes
It's important that the proper mime-types are set on your server for any font files you are sending out.  WOFF for example is a relatively new format, and many setups do not have the mime type out of the box.
The latest Firefox releases require a CORS header to be set if you aren't serving from the same domain.  As such I'd suggest adding Access-Control-Allow-Origin: * headers to all js, css, image and font files hosted on a separate domain (just for future proofing)
There are several Type/Font hosting sites on the web that are available.  Some have limited versions of commercial fonts, or only free/open-license fonts.
D: Font Families
A common mistake that I see is people will specify different font families for the different versions of the same font, you only need to specify the weight/style appropriately.
@font-face {
    font-family: 'Open Sans';
    src: url('OpenSans-Regular-webfont.eot');
    src: url('OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('OpenSans-Regular-webfont.woff') format('woff'),
         url('OpenSans-Regular-webfont.ttf') format('truetype'),
         url('OpenSans-Regular-webfont.svg#open_sansregular') format('svg');
    font-weight: normal;
    font-style: normal;

}

@font-face {
    font-family: 'Open Sans';
    src: url('OpenSans-Bold-webfont.eot');
    src: url('OpenSans-Bold-webfont.eot?#iefix') format('embedded-opentype'),
         url('OpenSans-Bold-webfont.woff') format('woff'),
         url('OpenSans-Bold-webfont.ttf') format('truetype'),
         url('OpenSans-Bold-webfont.svg#open_sansbold') format('svg');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Open Sans';
    src: url('OpenSans-Italic-webfont.eot');
    src: url('OpenSans-Italic-webfont.eot?#iefix') format('embedded-opentype'),
         url('OpenSans-Italic-webfont.woff') format('woff'),
         url('OpenSans-Italic-webfont.ttf') format('truetype'),
         url('OpenSans-Italic-webfont.svg#open_sansitalic') format('svg');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'Open Sans';
    src: url('OpenSans-BoldItalic-webfont.eot');
    src: url('OpenSans-BoldItalic-webfont.eot?#iefix') format('embedded-opentype'),
         url('OpenSans-BoldItalic-webfont.woff') format('woff'),
         url('OpenSans-BoldItalic-webfont.ttf') format('truetype'),
         url('OpenSans-BoldItalic-webfont.svg#open_sansbold_italic') format('svg');
    font-weight: bold;
    font-style: italic;
}
If this is the primary font for your entire site, and there are other varieties, you may wish to add them specifying the appropriate weight/style if needed. As long as you have the main 4 covered, you should be good for general use.
Beyond this, always specify an appropriate fallback font.
html,body,div,span,a,li,td,th {
  font-family: 'Open Sans', sans-serif;
}
TIP: If you are using "Arial, Helvetica, ..." simply use "sans-serif" and the most appropriate platform font similar to Helvetica (Arial on Windows) should be the one that gets used.
Comment: I'd add, as the font in question is definitely a licensed font, and is backed by several Type hosting sites, consider using those (which isn't what I think of when I saw your reference to the CDN). (While Node.JS can be used to host static content, that's not its strength).
Comment: @WiredPrairie As for type hosting sites, other than Google Fonts, not aware of one that is very popular that isn't fairly limited, and would be better served by self-hosting (in-site, or inline cdn)

While static file hosting isn't NodeJS's strength it does it very well, much closer to say Nginx than most other web servers.  It doesn't do in-memory file caching, so on an OS that doesn't provide this as a feature, it may be slower.
Comment: Not sure I'd agree about type hosting being limited, and Node.js as a static file server would, by many, not be considered a best practice/fit.
Comment: @WiredPrairie I know this was an old comment, TBH, these days if not hosting in a popular web cdn, I'd probably self-host behind NGINX configured for HTTP/2, which will work pretty well.  Lately most of my apps are reverse-proxied behind NGINX, with static/generated assets configured.


How to make hash/array of params out of several selects?

Question: I have two select dropdowns and when a user selects an option from each of them It has to group them in the following manner:
job =>
  {
    "types" => [1,2,3]
  }

or at least like this:
job => {
  "types" => { "first" => "1", "second" => "2" }
}

Is this possible to do in Rails?
For example, this example only sends the last select value:
<%= simple_form_for @job, url: jobs_path do |f| %>

  <% 2.times do %>
    <%= f.input :types, as: :select, collection: @types %>
  <% end %>

<% end %>

Answer: How about using multiple select instead?
<%=f.select(:types, @types, multiple: true) %>


Request for crazy integrals

Question: I'm a sucker for exotic integrals like the one evaluated in this post. I don't really know why, but I just can't get enough of the amazing closed forms that some are able to come up with.
So, what are your favorite exotic integral identities, and how do you prove them?
Comment: You may want to invest in this book. I am giving it to myself as a Christmas present

https://www.amazon.com/dp/0521796369/?tag=stackoverflow17-20&fbclid=IwAR2zdOpuW9aiUQINxOUmms-U6WYqGTWtdOhP-8EPC0v33RfGsrHeoXlnNZ4
Comment: $$\int_{0}^{\infty} \frac{x\ln(\tanh(x))^2}{3\cosh(2x)-2e^{-2x}}\text{d}x
= -\frac{\pi^4}{96\sqrt{3} } -\frac{\ln3\ln^3(2+\sqrt{3} )}{24\sqrt{3} }
-\frac{\pi^2}{12\sqrt{3} }\operatorname{Li}_2\left (-\frac{1}{\sqrt{3}}   \right )
+\frac{\pi^2}{12\sqrt{3} }\operatorname{Li}_2\left (\frac{1}{\sqrt{3}}   \right)
-\frac{\pi^2}{4\sqrt{3} }\operatorname{Li}_2\left (\sqrt{3}-2   \right)
-\frac{1}{2\sqrt{3} }\operatorname{Li}_4\left (2-\sqrt{3}   \right)
+\frac{1}{2\sqrt{3} }\operatorname{Li}_4\left (-2+\sqrt{3}   \right)$$
Comment: You should refer to this question:

https://math.stackexchange.com/questions/1096701/nice-book-on-integrals
Comment: I know what you mean - I can't get enough of 'em either! There's that one that Peter Borwein likes to use in his demostrations: a product of progressively scaled _sinc_ functions, that's π/2 upto a certain point then starts to be a bit less. A _very very __tiny___ bit!
Comment: You can invent such integrals through "milking" techniques described [here](https://math.stackexchange.com/questions/2821112/integral-milking). Perhaps [this one](https://math.stackexchange.com/a/2826594) is the most remarkable they found.
Comment: @aaaaaaaaabbbbbbbbbcccccc wow. how do you get that one?
Comment: $\int_{0}^{\frac{1}{2}}\frac{\operatorname{arccot}\left(x\right)}{x^{2}-x-1}dx = -\frac{\left(\pi+2\arctan\left(2\right)\right)\operatorname{arccoth}\left(\sqrt{5}\right)}{2\sqrt{5}}$
Answer: Here are some of my favorites:
$$\int_0^\pi \sin^2\Big(x-\sqrt{\pi^2-x^2}\Big)dx=\frac{\pi}{2}$$
$$\int_0^\infty \frac{\ln(x)}{(1+x^{\sqrt 2})^\sqrt{2}}dx=0$$
$$\int_0^\infty \frac{dx}{(1+x^{1+\sqrt{2}})^{1+\sqrt{2}}}=\frac{1}{\sqrt{2}}$$
$$\int_{-\infty}^\infty \ln(2-2\cos(x^2))dx=-\sqrt{2\pi}\zeta(3/2)$$
$$\int_0^\infty \frac{\text{erf}^2(x)}{x^2}dx=\frac{4\ln(1+\sqrt{2})}{\sqrt{\pi}}$$
$$\int_0^\infty \frac{x^{3}\ln(e^x+\frac{x^3}{6}+\frac{x^2}{2}+x+1)-x^4}{\frac{x^3}{6}+\frac{x^2}{2}+x+1}=\frac{\pi^2}{2}$$
$$\int_0^{\pi/2} \ln(x^2+\ln^2(\cos(x)))dx=\pi\ln(\ln(2))$$
$$\int_0^\infty \frac{\arctan(2x)+\arctan(x/2)}{x^2+1}dx=\frac{\pi^2}{4}$$
$$\int_0^{\pi/2}\frac{\sin(x+100\tan(x))}{\sin(x)}dx=\frac{\pi}{2}$$
$$\int_0^1 \frac{x\ln(1+x+x^4+x^5)}{1+x^2}dx=\frac{\ln^2(2)}{2}$$
$$\int_0^{1/2}\sin(8x^4+x)\cos(8x^4-x)\cos(4x^2)xdx=\frac{\sin^2(1)}{16}$$
$$\int_0^{2\pi} \sqrt{2+\cos(x)+\sqrt{5+4\cos(x)}}dx=4\pi$$
And here are four extremely exotic scrumptious integrals:
$$\int_0^1 \frac{\sin(\pi x)}{x^x (1-x)^{1-x}}dx=\frac{\pi}{e}$$
$$\int_{-\infty}^\infty \frac{dx}{(e^x-x)^2+\pi^2}=\frac{1}{1+\Omega}$$
$$\int_0^\infty \frac{3\pi^2+4(z-\sinh(z))^2}{[3\pi^2+4(z-\sinh(z))^2]^2+16\pi^2(z-\sinh(z))^2}dz=\frac{1}{8+8\sqrt{1-w^2}}$$
$$\int_0^{\pi/2}\ln|\sin(mx)|\ln|\sin(nx)|dx=\frac{\pi^3}{24}\frac{\gcd^2(m,n)}{mn}+\frac{\pi \ln^2(2)}{2}$$
...where $\Omega$ is the Omega Constant, $w$ is the Dottie Number, and $m,n\in\mathbb N$.
Comment: Just the user I was hoping would answer! Thank you for your contribution, those integrals look delicious! :)
Comment: Are you sure that the $6$-th integral you listed (the one that evaluates as $\pi^2$) converges? The graph of it tells me otherwise...
Comment: @clathratus My apologies; the $-x^2$ should have been $-x^4$. I have fixed my answer so that the integral converges.
Answer: Here are some links to a few integrals: 1
(Big list, but not all of them got the right answer).
From AoPS: 2, 3 , 4. Some that are solvable with Feynman's trick: here.
As for my favourites (most of them appeared on Romanian Mathematical Magazine), some are: $$I_1=\int_0^\frac{\pi}{2} \frac{\arctan(\tan x\sec x)}{\tan x +\sec x}dx=\frac{\pi}{2}\ln 2 -\frac{\pi}{6}\ln(2+\sqrt 3)$$
$$I_2=\int_0^\infty \exp\left(-\frac{3x^2+15}{2x^2+18}\right)\cos\left(\frac{2x}{x^2+9}\right)\frac{dx}{x^2+1}=\frac{\pi}{e}$$
$$I_3=\int_0^1 \frac{\ln^2 (1+x) (\ln^2 (1+x) +6\ln^2(1-x))}{x}dx=\frac{21}{4}\zeta(5)$$
$$I_4=\int_0^\infty \frac{\ln x}{(\pi^2+\ln^2 x)(1+x)^2}\frac{dx}{\sqrt x}=-\frac{\pi}{24}$$
$$I_5=\int_0^\infty \frac{1-\cos x}{8-4x\sin x +x^2(1-\cos x)}dx=\frac{\pi}{4}$$
$$I_6=\int_0^\infty \frac{\arctan x}{x^4+x^2+1}dx=\frac{\pi^2}{8\sqrt{3}}-\frac{2}{3}G+\frac{\pi}{12}\ln(2+\sqrt{3})$$
$$I_7=\int_0^\infty \frac{\ln(1+x)}{x^4-x^2+1}dx=\frac{\pi}{6}\ln(2+\sqrt 3)+\frac23 G -\frac{\pi^2}{12 \sqrt 3}$$
$$I_8=\int_0^1 \frac{\ln(1-x^2)\ln(1+x^2)}{1+x^2}dx=\frac{\pi^3}{32}-3G\ln 2+\frac{\pi}{2}\ln^22.$$
$$I_{9}=\int_0^{\frac{\pi}{4}} \ln\left(2+\sqrt{1-\tan^2 x}\right)dx = \frac{\pi}{2}\ln\left(1+\sqrt{2}\right)+\frac{7\pi}{24}\ln2-\frac{\pi}{3}\ln\left(1+\sqrt{3}\right)-\frac{G}{6}$$
$$I_{10}=\int_{-\infty}^\infty \frac{\sin \left(x-\frac{1}{x}\right) }{x+\frac{1}{x}}dx=\frac{\pi}{e^2}$$
$$I_{11}=\int_{-\infty}^\infty \frac{\cos \left(x-\frac{1}{x}\right) }{\left(x+\frac{1}{x}\right)^2}dx=\frac{\pi}{2e^2}$$
$$I_{12}=\int_0^1 \frac{\ln(1-x)\ln(1-x^4)}{x}dx=\frac{67}{32}\zeta(3)-\frac{\pi}{2} G$$
$$I_{13}=\int_0^\frac{\pi}{2} x^2 \sqrt{\tan x}dx=\frac{\sqrt{2}\pi(5\pi^2+12\pi\ln 2 - 12\ln^22)}{96}$$
$$I_{14}=\int_0^\frac{\pi}{4} \operatorname{arcsinh} (\sin x) dx=G-\frac58\operatorname{Cl}_2\left(\frac{\pi}{3}\right)$$
$$I_{15}=\int_0^\frac{\pi}{2} x \arcsin \left(\sin x-\cos x\right)dx=\frac{\pi^3}{96}+\frac{\pi}{8}\ln^2 2$$
$$I_{16}=\int_0^\infty \int_0^\infty \frac{\ln(1+x+y)}{xy\left((1+x+y)(1+1/x+1/y)-1\right)}dxdy=\frac72 \zeta(3)$$
Where $G$ is Catalan's constant and $\operatorname{Cl}_2 (x)$ is the Clausen function.
Comment: These are really nice integrals. Thanks.
Comment: Cheers @Zacky! I too will be working on these!
Comment: @Zacky Oh yeah, looks like you have one. Nice!
Comment: @Frpzzd  Here is another one that you might like: $$\int_{-\infty}^\infty \frac{\cos\left(x-\frac{1}{x}\right)}{\left(x+\frac{1}{x}\right)^2}dx$$
Comment: Could I have a starter tip on $I_6$ and $I_7$? I'm very lost
Comment: For $I_6$ you can follow the same approach as seen here (it should be easier) https://math.stackexchange.com/q/2983399/515527.
For $I_7$ you can split the integral $\int_0^1 +\int_1^\infty $ and in the second one let $x=\frac1t$, then you get two integrals, one is this: https://math.stackexchange.com/questions/2961277/integral-int-01-fracx21-ln1xx4-x21dx and one: https://math.stackexchange.com/questions/2802487/integral-int-01-frac-sqrt-x-ln-x-x2-x1dx
Comment: The link you provided for $I_6$ only shows me how to do $$\int_0^\infty \frac{\arctan(x^2)}{x^4+x^2+1}dx$$ but doesn't actually help me with $I_6$.
Comment: @clathratus Substitute $x=\frac1t$ then add what you get with the initial integral. Thus you get: $$2I_6=\frac{\pi}{2}\int_0^\infty \frac{dx}{x^4+x^2+1}-\int_0^\infty\frac{(x^2-1)\arctan x}{x^4+x^2+1}dx $$
The first one is trivial, and for the second one integrate by parts followed by the substitution $x=\tan t$. Afterwards I suggest to use Feynman's trick.
Comment: wait nevermind. Thank you for all the help:)
Comment: @Zacky Got any hints for the last one? Through substitution, I've worked it down to
$$4\int_2^\infty \frac{\sin\sqrt{x^2-4}}{x}dx$$
but I've no idea how to do that one.
Comment: @Frpzzd a proof via residue theorem (not a fan) is found here: https://math.stackexchange.com/questions/3058069/integral-for-the-new-year-2019.

I was about to post another way  (using real methods), but I realised I am missing something and gave up. I basically substituted $x-\frac{1}{x}=t$.
Comment: @Zacky Yeah, I'm not a fan of the RT either. I've reduced it to the integral
$$2\int_0^\infty \frac{x\sin(x)}{x^2+4}dx$$
which is a classic that can be done with the RT. Want to try and find another way using real methods?
Comment: @Frpzzd well, using the substitution: $x=2t$ it reduces to $\int_0^\infty \frac{t\sin (2t)}{t^2+1}dt$. I have a proof using real methods here: https://imgur.com/a/BhrHLx6, only that $t=2$ in the photo, but sure maybe there are other nice proofs.
Comment: The way I solve it is similar to this: https://math.stackexchange.com/a/365671/515527 , but  I got confused at this row: $$2 \int_0^\infty \frac{\cos\left(x-\frac{1}{x}\right)}{1+x^2} \mathrm{d}x = \int_{-\infty}^\infty \frac{2 \cos(u)}{1+x_+(u)^2} \frac{x_+^\prime(u)}{2} \mathrm{d}u + \int_{-\infty}^\infty \frac{2 \cos(u)}{1+x_-(u)^2} \frac{x_-^\prime(u)}{2} \mathrm{d}u$$
Comment: Could I have some help on $I_{14}$? I've 'reduced' it to $$I_{14}=\frac\pi4\ln\left(\frac{1+\sqrt3}{\sqrt2}\right)-\int_0^{1/\sqrt2}\frac{\arcsin(x)}{\sqrt{1+x^2}}dx$$ but I don't know how to continue with the remaining integral. It is fairly evident that there is an intimate connection between $I_{14}$ and $\mathrm{Cl}_2$ but I am having trouble finding it exactly. Would it have something to do with $\sinh^{-1}(\sin x)=\ln\left(\sin(x)+\sqrt{1+\sin^2(x)}\right)$?
Comment: @clathratus try to apply Feynman's trick from the start.
Comment: uuuuuhhhhh, how? setting $\int_0^{\pi/4}\sinh^{-1}(\sin ax)dx$ isn't very helpful, and neither is $\int_0^{\pi/4}\sinh^{-1}(a\sin x)dx$.
Comment: Hmm, the second one should be helpful. I'll  see tomorrow.
Answer: You might find a lot of crazy integrals and series in the book, (Almost) Impossible Integrals, Sums, and Series. A few examples of integrals,
$$\int_0^{\pi/2} \cot (x) \log (\cos (x)) \log ^2(\sin (x))  \operatorname{Li}_3\left(-\tan ^2(x)\right) \textrm{d}x$$
$$
=\frac{109}{128}\zeta(7)-\frac{23}{32}\zeta(3)\zeta(4)+\frac{1}{16}\zeta(2) \zeta(5);$$
$$
\int_0^{\log(1+\sqrt{2})} \coth (x)  \log (\sinh (x)) \log \left(2-\cosh ^2(x)\right)\text{Li}_2\left(\tanh ^2(x)\right) \textrm{d}x$$
$$
=\frac{73}{128}\zeta(5)-\frac{17}{64}\zeta(2)\zeta(3);$$
$$\int_0^1 \frac{\displaystyle\log^2(1-x)\operatorname{Li}_3\left(\frac{x}{x-1}\right)}{1+x} \textrm{d}x$$
$$=\frac{1}{36} \log ^6(2)-\frac{1}{6}\log ^4(2)\zeta (2)+\frac{7}{24} \log ^3(2) \zeta (3)+\frac{5}{8}\log ^2(2) \zeta (4)-\frac{581}{48} \zeta (6)$$
$$
-\frac{7}{8} \log (2) \zeta (2)\zeta (3)-\frac{79}{64} \zeta^2 (3);$$
$$
\sin (\theta)\sin\left(\frac{\theta}{2}\right)\int_0^1 \frac{\displaystyle x}{(1-x) \left(1-2 x \cos (\theta)+x^2\right)} (\zeta (m+1)-\text{Li}_{m+1}(x)) \textrm{d}x$$
$$
=(-1)^{m-1}  \sum_{k=1}^{\infty}\frac{H_{k+1}}{(k+1)^{m+1}}\sin\left(\frac{k \theta}{2}\right)\sin\left(\frac{(k+1)\theta}{2}\right)$$
$$
+(-1)^{m-1}\sum_{i=2}^{m} (-1)^{i-1}\zeta(i)\sum_{k=1}^{\infty}\frac{\displaystyle \sin\left(\frac{k\theta}{2}\right)\sin\left(\frac{(k+1) \theta}{2}\right)}{(k+1)^{m-i+2}};$$
$$\sin\left(\frac{\theta}{2}\right)\int_0^1\frac{x(\cos(\theta)-x)}{(1-x)(1-2x\cos(\theta)+x^2)}(\zeta (m+1)-\text{Li}_{m+1}(x))\textrm{d}x$$
$$
=(-1)^{m-1}\sum_{k=1}^{\infty}\frac{H_{k+1}}{(k+1)^{m+1}}\sin\left(\frac{k\theta}{2}\right)\cos\left(\frac{(k+1)\theta}{2}\right)$$
$$
+(-1)^{m-1}\sum_{i=2}^{m}(-1)^{i-1} \zeta(i)\sum_{k=1}^{\infty} \frac{\displaystyle \sin\left(\frac{k\theta}{2}\right)\cos\left(\frac{(k+1)\theta}{2}\right)}{ (k+1)^{m-i+2}}.$$
A few examples of series (which you may also transform into some fancy integrals if you wish to),
$$\sum_{n=1}^{\infty}\frac{H_n}{n^2}\left(\frac{ H_1}{1^3}+\frac{H_2}{2^3}+\cdots +\frac{H_n}{n^3} \right)=10\zeta(7)+\frac{9}{2}\zeta(2)\zeta(5)-\frac{23}{2}\zeta(3)\zeta(4);$$
$$
\sum_{n=1}^{\infty}\frac{H_n}{n^3}\left(\frac{H_1}{1^2}+\frac{H_2}{2^2}+\cdots +\frac{H_n}{n^2} \right)=\frac{23}{2}\zeta(3)\zeta(4)-\frac{11}{2}\zeta(2)\zeta(5)-4\zeta(7);$$
$$\sum_{n=1}^{\infty}\frac{H_n^2}{n^2}\left(\frac{H_1}{1^2}+\frac{H_2}{2^2}+\cdots +\frac{H_n}{n^2} \right)=\frac{45}{16}\zeta(7)-\frac{7}{2}\zeta(2)\zeta(5)+\frac{17}{2}\zeta(3)\zeta(4);$$
$$\sum_{n=1}^{\infty}\frac{H_n}{n^2}\left(\frac{H_1^2}{1^2}+\frac{H_2^2}{2^2}+\cdots +\frac{H_n^2}{n^2} \right)=\frac{93}{8} \zeta(7)+\frac{11}{2}\zeta(2)\zeta(5)-\frac{51}{4}\zeta(3)\zeta(4);$$
$$
\zeta(4)$$
$$
=\frac{8}{5}\sum _{n=1}^{\infty } \frac{H_n H_{2 n}}{n^2}+\frac{64}{5}\sum _{n=1}^{\infty } \frac{ \left(H_{2 n}\right)^2}{ (2 n+1)^2}+\frac{64}{5}\sum _{n=1}^{\infty } \frac{H_{2 n}}{(2 n+1)^3}$$
$$
-\frac{8}{5}\sum _{n=1}^{\infty } \frac{\left(H_{2 n}\right){}^2}{ n^2}-\frac{32}{5}\sum _{n=1}^{\infty } \frac{H_n H_{2 n}}{(2 n+1)^2}-\frac{64}{5}\log(2)\sum _{n=1}^{\infty } \frac{H_{2 n}}{(2 n+1)^2}-\frac{8}{5}\sum _{n=1}^{\infty } \frac{H_{2 n}^{(2)}}{ n^2}.$$
Extremely crazy integrals you may also find in the paper The derivation of eighteen special challenging logarithmic integrals by Cornel Ioan Valean.
I'm sure a lot of crazy integrals you'll also meet in the sequel of the book (Almost) Impossible Integrals, Sums, and Series since the author prepares a continuation of this book.
Comment: WOAH!! This is very impressive! I will have to buy that book! Thanks for the great answer (+1)
Answer: $$\int_{-\infty}^\infty\prod_{k=1}^n\operatorname{sinc}{\theta\over(2k-1)}d\theta=\pi ,$$provided $n\in{1 ... 7}$ ... for $n\geq8$, it starts being $<π$ by the most miniscule amounts!
Comment: It's actually called _the Borwein integral_. I strongly recommend the works of Peter Borwein in this connection - you'd _love_ it! There's _heaps_ of these crazy integrals in his works, & he's a specialist in unlimited precision arithmetic. He has an algorithm for finding closed-form expressions given a decimal expansion, that finds with a certain probability - rapidly increasing with number of digits - the peak-probability closed-form ... like if you were to say "hmmm - that _looks like_ the square-root of ζ(3)!", or something - but _systematised_. And _Ising_ integrals ... and ... and ... !
Comment: @Clathratus -- I presume you mean me? I like the sound of the idea! Quite likely ... if it means I get an endless supply of the "meat that you know not of", to paraphrase a certain prophet perched on the edge of a well in Samaria!
Comment: Use email@example.com_ ¶ (It's _Koine Greek_ ... it means _to which they had gone_.)
Comment: @Clathratus -- what I'll do for now, I think, is get it sorted _just why_ that Borwein integral has it's property - afterall, I've quoted the result without any proof! Got sufficient material on it - and it appears within my measure. It's immediately less mysterious reflecting that the Fourier transform of _sinc_ is the _top-hat_ function ... so analysing it - if you have the integral of sinc×cos(a) (a being the _radius_ of the top-hat) it _suddenly_ becomes 0 the instant you have more than a full cycle of cos inside the central 'lobe' of _sinc_. And that is indeed what it's essentially about.
Comment: Really interesting! where can I learn more?
Comment: Wow thank you for this! I'll certainly look into that. :)
Comment: You're _very_ welcolme ... I _well_ -understand the compulsion!
Comment: I have noticed that you are very enthusiastic about cool integral identities, and I was wondering if you'd like to collaborate on an integral document with user @DavidG and me. let me know :)
Comment: Great! My email is email@example.com. I will contact you with David and we'll bring you to the document!
Comment: Wait I messed up... You need to contact me/tell me your email so I can take you to the document
Comment: I look forward to communiqué with you soon. This very moment is not practical ... in fact it's only by a fluke that you caught me when you did, really!
Answer: I'm partial to the one in this question
What is the Centroid of $z=\frac{1}{(1-i\tau)^{i+1}},\ \ \tau\in (-\infty,\infty)$ .
I found a solution, but it was hardly elegant.  A solution that doesn't use hypergeometric functions in the middle of the solution would be nice.
Comment: Hypergeometric function for not, thanks for the answer.
Answer: This might not be a difficult integral but it made me come up with a new method to solve it so I think it's quite exotic.
Let's do the general integral
$\displaystyle I(a,b)=\int_{0}^{\infty}e^{-(ax^{-2}+bx^{2})}dx$
Differentiate with respect to a
$\displaystyle \frac{\partial I}{\partial a}=\int_{0}^{\infty}x^{-2}e^{-(ax^{-2}+bx^{2})}dx$
Now differentiate with respect to b
$\displaystyle \frac{\partial^2 I}{\partial a \partial b}=\int_{0}^{\infty}x^{-2}x^{2}e^{-(ax^{-2}+bx^{2})}dx$
$\displaystyle \frac{\partial^2 I}{\partial a \partial b}=\int_{0}^{\infty}e^{-(ax^{-2}+bx^{2})}dx$
$\displaystyle \frac{\partial^2 I}{\partial a \partial b}=I$
Thus our integral satisfies this PDE.This is a hyperbolic homogenous PDE. It is a second order PDE but it is first order with respect to each of the variables so we'll need two boundary conditions to determine a unique solution.(In this case two asympotic BCs and one Drichlet boundary condition will be used).Keep this in mind we'll need it later.
Let's complete the square of expression in the exponential.
$\displaystyle I(a,b)=\int_{0}^{\infty}e^{-(ax^{-2}+bx^{2}-2\sqrt{ab}+2\sqrt{ab})}dx$
$\displaystyle I(a,b)=\int_{0}^{\infty}e^{-(\sqrt{a}x^{-1}-\sqrt{b}x)^{2}-2\sqrt{ab}}dx$
$\displaystyle I(a,b)=e^{-2\sqrt{ab}}\int_{0}^{\infty}e^{-(\sqrt{a}x^{-1}-\sqrt{b}x)^{2}}dx$
Now let's explore more of it's properties.One thing to note is that this integral diverges(blows up) at b=0 but at a=0 it has a well known value. It is the Gaussian integral so
$\displaystyle I(0,b)=\int_{0}^{\infty}e^{-(bx^{2})}dx=\frac{1}{2}\sqrt{\frac{\pi}{b}}$
The negative exponential was extracted from the integral rather than the positive one beacause
$\displaystyle \lim_{a\to\infty}\int_{0}^{\infty}e^{-(ax^{-2}+bx^{2})}dx=0$
and
$\displaystyle \lim_{a\to\infty}e^{-2\sqrt{ab}}=0$
So let's assume that we assume that the solution to our PDE is of the form
$\displaystyle I(a,b)=e^{-2\sqrt{ab}}K(b)$
where K is a function of b(and diverges at b=0)
Let's put this in the PDE
$\displaystyle \frac{\partial I}{\partial a}=-\sqrt{\frac{b}{a}}e^{-2\sqrt{ab}}K(b)$
$\displaystyle \frac{\partial^2 I}{\partial a \partial b}=-\sqrt{\frac{b}{a}}e^{-2\sqrt{ab}}K^{'}(b)-\frac{1}{2\sqrt{ab}}e^{-2\sqrt{ab}}K(b)+\sqrt{\frac{b}{a}}\sqrt{\frac{a}{b}}e^{-2\sqrt{ab}}K(b)$
$\displaystyle \frac{\partial^2 I}{\partial a \partial b}=e^{-2\sqrt{ab}}(-\sqrt{\frac{b}{a}}K^{'}(b)-\frac{K(b)}{2\sqrt{ab}}+K(b))$
As
$\displaystyle \frac{\partial^2 I}{\partial a \partial b}=I$
So
$\displaystyle e^{-2\sqrt{ab}}(-\sqrt{\frac{b}{a}}K^{'}(b)-\frac{K(b)}{2\sqrt{ab}}+K(b))=e^{-2\sqrt{ab}}K(b)$
$\displaystyle -\sqrt{\frac{b}{a}}K^{'}(b)-\frac{K(b)}{2\sqrt{ab}}+K(b)=K(b)$
$\displaystyle -\sqrt{\frac{b}{a}}K^{'}(a)=\frac{K(b)}{2\sqrt{ab}}$
$\displaystyle K^{'}(b)=-\frac{K(b)}{2b}$
This is a separable ODE.Let's solve it
$\displaystyle \frac{1}{K}dK=-\frac{1}{2}\frac{1}{b}db$
Let's integrate
$\displaystyle \int \frac{1}{K}dK=-\frac{1}{2}\int \frac{1}{b}db$
$\displaystyle \ln(K)=-\frac{1}{2}\ln(b)+C$
$\displaystyle \ln(K)=\ln(b^{-\frac{1}{2}})+C$
$\displaystyle K=e^{C}b^{-\frac{1}{2}}$
Let
$\displaystyle v=e^{C}$
So
$\displaystyle K(b)=vb^{-\frac{1}{2}}$
Thus the solution is
$\displaystyle I(a,b)=ve^{-2\sqrt{ab}}b^{-\frac{1}{2}}$
This expression diverges at b=0 which is exactly what we wanted. Now let's determine the constant v. As
$\displaystyle I(0,b)=\frac{1}{2}\sqrt{\frac{\pi}{b}}$
So
$\displaystyle \frac{1}{2}\sqrt{\frac{\pi}{b}}=vb^{-\frac{1}{2}}e^{0}$
$v=\frac{\sqrt{\pi}}{2}$
Thus the integral is
$\displaystyle \boxed{I(a,b)=\frac{1}{2}\sqrt{\frac{\pi}{b}}e^{-2\sqrt{ab}}}  (0\leqslant a,b)$
Comment: cool stuff! I really don't know anything about PDE's but this is sure exotic! Thanks for the answer.
Answer: Here are some integrals collected by me and my friend pprime
I bring you many beautiful integrals that I have collected over time, I hope you enjoy them as much as I do.
If you want to answer one of these integrals.

Coxeter Integrals $\int_0^{\frac{\pi }{2}} {\arccos \left( {\frac{{\cos \theta }}{{1 + 2\cos \theta }}} \right)d\theta  = \frac{5}{{24}}\pi ^2 }$

$\int_0^{\frac{\pi }{2}} {\arccos \left( {\frac{1}{{1 + 2\cos \theta }}} \right)d\theta  = \frac{1}{8}\pi ^2 }$

$\int_0^{\frac{\pi }{2}} {\arccos \left( {\frac{{1 - \cos \theta }}{{2\cos \theta }}} \right)d\theta  = \frac{{11}}{{72}}\pi ^2 }$

For any $n$ natural number. Show that $\int\limits_{0}^{2\pi }{\frac{\left( 1+2\cos x \right)^{n}\cos nx}{3+2\cos x}dx}=\frac{2\pi }{\sqrt{5}}\left( 3-\sqrt{5} \right)^{n}$

Let $0<a<1$ Prove that $\int\limits_{0}^{2\pi }{\frac{\cos ^{2}3x}{1+a^{2}-2a\cos 2x}dx}=\frac{a^{2}-a+1}{1-a}\pi$

For $a>1$ Prove that $\int\limits_{-\pi }^{\pi }{\frac{x\sin x}{1+a^{2}-2a\cos x}dx}=\frac{\pi }{2}\ln \left( 1+\frac{1}{a} \right)$

$\int\limits_{0}^{1}{\frac{\ln \ln \frac{1}{x}}{\left( 1+x \right)^{2}}dx}=\frac{1}{2}\left( \ln \pi -\ln 2-\gamma  \right)$

$\int_{0}^{+\infty }{\frac{\sinh x}{\cosh ^{2}x}\frac{dx}{x}}=\frac{4G}{\pi }$ where $G$ is the Catalan's constant

Let $z$ be a real number. Show that $\displaystyle\frac{1}{2\pi}\int_0^{2\pi}\log|z-e^{i\theta}|\,d\theta = \left\{              \begin{array}{ll}                0 &  \text{ si }|z|<1\\                   \log|z| &  \text{ si }|z|\ge1              \end{array}       \right.$

$\int\limits_{0}^{+\infty }{\exp \left( -a^{2}x\left( \frac{x-6}{x-2} \right)^{2} \right)\frac{dx}{\sqrt{x}}}=\frac{\sqrt{\pi }}{a}$

Let $\alpha >0$ Prove that $I\left( \alpha  \right)=\int\limits_{0}^{\frac{\pi }{2}}{\arctan \left( \frac{2\alpha \sin ^{2}x}{\alpha ^{2}-1+\cos ^{2}x} \right)dx}=\pi \arctan \left( \frac{1}{2\alpha } \right)$

$\int\limits_0^1 {\frac{{\log \left( {1 - x} \right)}}{x} \cdot \frac{{2z}}{{\log ^2 x + \left( {2\pi z} \right)^2 }}dx}  =  - \log \left( {\frac{{z!e^z }}{{z^z \sqrt {2\pi z} }}} \right),\;\;\operatorname{Re} \left( z \right) > 0$

13.$\int\limits_{0}^{1}{\frac{1-x}{\log x}\cdot \left( x+x^{2}+x^{2^{2}}+... \right)dx}$

Let $a_k  > 0$ and $a_0  > \sum\limits_{k = 1}^n {a_k }$. Show that $\int\limits_0^{ + \infty } {\prod\limits_{k = 0}^n {\frac{{\sin \left( {a_k x} \right)}}{x}dx} }  = \frac{\pi }{2}\prod\limits_{k = 1}^n {a_k }$

Let $0 < z < 1,\alpha  > 0,\beta  \in {\Bbb C}$
$\int\limits_0^{ + \infty } {\sin \left( {\alpha t^{\frac{1}{z}}  + \beta } \right)} dt = \frac{{\Gamma \left( {z + 1} \right)}}
{{\alpha ^z }}\sin \left( {\frac{{\pi z}}{2} + \beta } \right)$

$\operatorname{Re}\left( \alpha  \right)\ge 1$
$\int\limits_{ - \infty }^{ + \infty } {\left| {\sin x} \right|^{\alpha  - 1} \frac{{\sin x}}{x}} dx = 2^{\alpha  - 1} \frac{{\Gamma ^2 \left( {\frac{\alpha }{2}} \right)}}{{\Gamma \left( \alpha  \right)}}$

$\int\limits_0^1 {\sin \left( {\pi x} \right)} x^x \left( {1 - x} \right)^{1 - x} dx = \frac{{\pi e}}{{24}}$

$\int\limits_0^{\frac{\pi }{4}} {\frac{{x^3 }}{{\sin ^2 x}}} dx = \frac{{3\pi }}{4}G - \frac{{\pi ^3 }}{{64}} + \frac{{3\pi ^2 }}
{{32}}\log 2 - \frac{{105}}{{64}}\varsigma \left( 3 \right)$

Let $\theta  > 0$
$\int\limits_{ - \infty }^{ + \infty } {\frac{{\left| {\cos \theta x} \right|}}{{1 + x^2 }}dx}  = 4\cosh \theta \arctan e^{ - \theta }$

Let $\alpha  \geqslant 0,\theta  \in {\Bbb C}\backslash \pi {\Bbb Z}$
$\int\limits_{ - \infty }^{ + \infty } {\frac{{\cos \alpha x}}{{1 + 2\cos \theta x + x^2 }}dx}  = \frac{\pi }{{\sin \theta }}\frac{{\cos \left( {\alpha \cos \theta } \right)}}{{e^{\alpha \sin \theta } }}$

Show that $\int_{0}^{\frac{\pi }{2}}{\frac{d\theta }{1+\sin ^{2}\tan \theta }}=\frac{\pi }{2\sqrt{2}}\left( \frac{e^{2}+3-2\sqrt{2}}{e^{2}-3+2\sqrt{2}} \right)$

Let $\theta \in \left[ 0,\frac{\pi }{2} \right)$ Prove that $\int\limits_{-\infty }^{\infty }{\frac{\arctan x}{x^{2}-2x\sin \theta +1}dx}$

Given the function $y\left(x\right):\left [0,1\right]\to\left [0,1\right]$ continuous and decreasing such that $x^{a}-x^{b} = y^{a}-y^{b}$. Compute $\int\limits_{0}^{1}{\frac{\ln \left( y\left( x \right) \right)}{x}dx}$

$\int_{0}^{1}\left ( -1 \right )^{\left [ 1994x \right ] + \left [ 1995x \right ]}\binom{1993}{\left [ 1994x \right ]}\binom{1994}{\left [ 1995x \right ]}dx$

$\int\limits_0^1 {\frac{{dx}}{{1 + {}_2F_1 \left( {\frac{1}{n},x;\frac{1}{n};\frac{1}{n}} \right)}}}  = \frac{{\log \left( {\frac{{2n}}{{2n - 1}}} \right)}}{{\log \left( {\frac{n}{{n - 1}}} \right)}}$

$\int\limits_0^{ + \infty } {W\left( {\frac{1}{{x^2 }}} \right)} dx = \sqrt {2\pi }$

$\int\limits_0^{ + \infty } {\frac{{W\left( x \right)}}{{x\sqrt x }}} dx = 2\sqrt {2\pi }$

Let $\alpha ,\beta  \in \Re  + $. Integrate $ \int\limits_0^{ + \infty } {\left( {\exp \left( { - \theta ^\alpha  } \right) - \frac{1}{{1 + \theta ^\beta  }}} \right)\frac{{d\theta }}{\theta }}  =  - \frac{1}{\alpha }\gamma$ where $W$ is the Lambert W function

$\int\limits_0^{\frac{\pi }{2}} {\frac{{\ln ^2 \sin x\ln ^2 \cos x}}{{\sin x\cos x}}dx}  = \frac{1}{4}\left( {2\zeta \left( 5 \right) - \zeta \left( 2 \right)\zeta \left( 3 \right)} \right)$

$\int\limits_0^{\frac{\pi }{2}} {4\cos ^2 x\left( {\ln \cos x} \right)^2 dx}  =  - \pi \ln 2 + \pi \ln ^2 2 - \frac{\pi }{2} + \frac{{\pi ^3 }}{{12}}$

$\int\limits_0^1 {\int\limits_0^1 {\frac{{dxdy}}{{\left( {\left[ {\frac{x}{y}} \right] + 1} \right)^2 }}} }  = \frac{1}{2}\left( {\zeta \left( 3 \right) + 1 - \zeta \left( 2 \right)} \right)$

$\int\limits_0^1 {\int\limits_0^1 {\ln \left( {1 - xy} \right)\ln x\ln ydxdy} }  = \zeta \left( 2 \right) + \zeta \left( 3 \right) + \zeta \left( 4 \right) - 4$

$\int\limits_0^1 {\int\limits_0^1 {...\int\limits_0^1 {\ln \left( {1 - \prod\limits_{1 \leqslant i \leqslant n} {x_i } } \right)\prod\limits_{1 \leqslant i \leqslant n} {\ln x_i } dx_1 dx_2 ...dx_n } } }  = \left( { - 1} \right)^{n - 1} \left( { - 2n + \sum\limits_{1 \leqslant k \leqslant 2n} {\zeta \left( k \right)} } \right)$

Prove that $\int_0^{\frac{\pi }{2}} {\arctan \left( {1 - \left( {\sin x\cos x} \right)^2 } \right)} dx = \pi \left( {\frac{\pi }
{4} - \arctan \sqrt {\frac{{\sqrt 2  - 1}}{2}} } \right)$

Let $s>0$ and $\alpha \in \left( 0,1 \right)$. Prove that $\int\limits_{0}^{+\infty }{\frac{\text{L}{{\text{i}}_{s}}\left( -x \right)}{{{x}^{1+\alpha }}}dx}=-\frac{\pi }{{{\alpha }^{s}}\sin \left( \pi \alpha  \right)}$

$\mathop {\lim }\limits_{n \to \infty } \int_{ - \pi }^\pi  {\frac{{n!2^{2n\cos \left( \phi  \right)} }}{{\left| {\prod\limits_{k = 1}^n {\left( {2ne^{i\phi }  - k} \right)} } \right|}}} d\phi  = 2\pi$

$\int\limits_{0}^{\frac{\sqrt{6}-\sqrt{2}-1}{\sqrt{6}-\sqrt{2}+1}}{\frac{\ln x}{\sqrt{x^{2}-2\left( 15+8\sqrt{3} \right)x+1}}\cdot \frac{dx}{x-1}}=\frac{2}{3}\left( 2-\sqrt{3} \right)G$ where $G$ is the Catalan's constant

Let $0<r<1$ and $r<s$ Prove that $\int_{-1}^{1}\frac{1}{x}\sqrt{\frac{1+x}{1-x}}\log \left | \frac{1+2rsx+\left ( r^{2}+s^{2}-1 \right )x^{2}}{1-2rsx+\left ( r^{2}+s^{2}-1 \right )x^{2}} \right |dx=4\pi \arcsin r$

$\int\limits_{0}^{1}{\cosh \left( \alpha \ln x \right)\ln \left( 1+x \right)\frac{dx}{x}}=\frac{1}{2\alpha }\left( \pi \csc \left( \pi \alpha  \right)-\frac{1}{\alpha } \right)$

Let $\alpha \ne 0$ be a real number. Prove that $\int\limits_{0}^{+\infty }{\frac{\ln \tan ^{2}\left( \alpha x \right)}{1+x^{2}}dx}=\pi \ln \tanh \alpha$

Consider $a>0,\ b\in \Re$. Prove that $\int\limits_{ - \infty }^{ + \infty } {\frac{{a^2 }}{{\left( {e^x  - ax - b} \right)^2  + \left( {a\pi } \right)^2 }}} dx = \frac{1}{{1 + W\left( {\frac{1}{a}e^{ - \frac{b}{a}} } \right)}}$

$\int_0^\pi  {\sin \left( {n\alpha } \right)\arctan \left( {\frac{{\tan \left( {\frac{\alpha }{2}} \right)}}{{\tan \left( {\frac{\varphi }{2}} \right)}}} \right)} d\alpha  = \frac{\pi }{{2n}}\left[ {\left( {\sec \left( \varphi  \right) - \tan \left( \varphi  \right))^n  - \left( { - 1} \right)^n } \right)} \right],\left| {n \in {\Bbb Z}^ +  ,0 < \varphi  < \frac{\pi }{2}} \right|$

$\int\limits_{0}^{+\infty }{\frac{\cos \alpha x-\cos \beta x}{\sin \theta x}\frac{dx}{x}}=\log \left( \frac{\cosh \frac{\beta \pi }{2\theta }}{\cosh \frac{\alpha \pi }{2\theta }} \right)$

$\int\limits_0^\pi  {\log \left( {1 - \cos x} \right)\log \left( {1 + \cos x} \right)dx}  = \pi \log ^2 2 - \frac{{\pi ^3 }}
{6}$

$\int\limits_{0}^{+\infty }{\frac{\arctan x}{\sinh \left( \frac{\pi x}{2} \right)}dx}=4\log \Gamma \left( \frac{1}{4} \right)-2\log \pi -3\log 2$

$\int\limits_{0}^{\frac{\pi }{2}}{x\cot x\log \sin xdx}=-\frac{{{\pi }^{3}}}{48}-\frac{\pi }{4}{{\ln }^{2}}2$

$\int\limits_{0}^{1}{\log \left( \text{arcsech}x \right)dx}=-\gamma -2\log 2-2\log \left( \frac{\Gamma \left( \frac{3}{4} \right)}{\Gamma \left( \frac{1}{4} \right)} \right)$

$\int\limits_{0}^{1}{\sqrt{\frac{1-8{{x}^{2}}+16{{x}^{4}}}{1+7{{x}^{2}}-8{{x}^{4}}}}\exp \left( \frac{4x\sqrt{1-{{x}^{2}}}}{\sqrt{1+8{{x}^{2}}}} \right)dx}=e-1$

Let $\left| \Im \left( n \right) \right|<1$ Prove that $\int\limits_{0}^{+\infty }{\frac{\cos \left( n\pi x \right)}{\cosh \left( \pi x \right)}\cdot {{e}^{-i\pi {{x}^{2}}}}dx}=\frac{1+\sqrt{2}\sin \frac{{{n}^{2}}\pi }{4}}{2\sqrt{2}\cosh \frac{n\pi }{2}}+i\frac{1-\sqrt{2}\cos \frac{{{n}^{2}}\pi }{4}}{2\sqrt{2}\cosh \frac{n\pi }{2}}$

Let f be a function of class $C'\left[ 0,a \right]$. Prove that $\int\limits_0^{2a} {\int\limits_0^{\sqrt {2ax - x^2 } } {\frac{{x\left( {x^2  + y^2 } \right)}}{{\sqrt {4a^2 x^2  - \left( {x^2  + y^2 } \right)^2 } }}f'\left( y \right)dydx} }  = \pi a^2 \left( {f\left( a \right) - f\left( 0 \right)} \right)$

$\int\limits_{0}^{+\infty }{\frac{\cos \alpha x}{x}\cdot \frac{\sinh \beta x}{\cosh \gamma x}dx}=\frac{1}{2}\log \left( \frac{\cosh \frac{\alpha \pi }{2\gamma }+\sin \frac{\beta \pi }{2\gamma }}{\cosh \frac{\alpha \pi }{2\gamma }-\sin \frac{\beta \pi }{2\gamma }} \right)\quad \left| \operatorname{Re}\left( \beta  \right) \right|<\left| \operatorname{Re}\left( \gamma  \right) \right|,\ \left| \operatorname{Re}\left( \beta  \right) \right|+\left| \operatorname{Im}\left( \alpha  \right) \right|<\left| \operatorname{Re}\left( \gamma  \right) \right|$

$\int\limits_{0}^{+\infty }{\frac{\sin \alpha x}{x}\cdot \frac{\sinh \beta x}{sinh\gamma x}dx}=\arctan \left( \tan \frac{\beta \pi }{2\gamma }\tanh \frac{\alpha \pi }{2\gamma } \right)\quad \left| \operatorname{Re}\left( \beta  \right) \right|<\left| \operatorname{Re}\left( \gamma  \right) \right|,\ \left| \operatorname{Re}\left( \beta  \right) \right|+\left| \operatorname{Im}\left( \alpha  \right) \right|<\left| \operatorname{Re}\left( \gamma  \right) \right|$

$\int\limits_{0}^{1}{\frac{x}{1+{{x}^{2}}}\cdot \arctan x\ln \left( 1-{{x}^{2}} \right)dx}=-\frac{{{\pi }^{3}}}{48}-\frac{\pi }{8}\ln 2+G\ln 2$

$\int\limits_{0}^{\frac{\pi }{2}}{\frac{\arctan \left( \alpha \sin x \right)}{\sin x}dx}=\frac{\pi }{2}{{\sinh }^{-1}}\alpha$

$\int\limits_{0}^{\frac{\pi }{2}}{\frac{{{x}^{2}}}{{{x}^{2}}+{{\log }^{2}}\left( 2\cos x \right)}dx}=\frac{\pi }{8}\cdot \left( 1-\gamma +\log 2\pi  \right)$

$\int\limits_{0}^{+\infty }{\sin \left( {{x}^{2}} \right){{\ln }^{2}}xdx}=\frac{\sqrt{2\pi }}{64}\cdot {{\left( 4\ln 2+2\gamma -\pi  \right)}^{2}}$

$\int\limits_{0}^{+\infty }{{{e}^{-\alpha x}}\sin \left( \beta x \right){{x}^{s-1}}dx}=\frac{\Gamma \left( s \right)}{\sqrt{{{\alpha }^{2}}+{{\beta }^{2}}}}\cdot \sin \left( s\arctan \frac{\beta }{\alpha } \right)$

$\int\limits_{0}^{+\infty }{{{e}^{-\alpha x}}\cos \left( \beta x \right){{x}^{s-1}}dx}=\frac{\Gamma \left( s \right)}{\sqrt{{{\alpha }^{2}}+{{\beta }^{2}}}}\cdot \cos \left( s\arctan \frac{\beta }{\alpha } \right)$

$\int\limits_{0}^{+\infty }{\frac{1}{1+{{e}^{\pi x}}}\cdot \frac{x}{1+{{x}^{2}}}dx}=\frac{1}{2}\cdot \left( \log 2-\gamma  \right)$

$\int\limits_{0}^{+\infty }{\frac{\cos \left( {{x}^{p}} \right)-{{e}^{-{{x}^{q}}}}}{{{x}^{1+r}}}dx}=\frac{\Gamma \left( 1-\frac{r}{p} \right)\Gamma \left( 1+\frac{r}{p} \right)-\Gamma \left( 1+\frac{r}{2p} \right)\Gamma \left( 1-\frac{r}{2p} \right)}{r\Gamma \left( 1+\frac{r}{p} \right)}$

$\int\limits_{\pi }^{+\infty }{\frac{\sin x}{x}dx}+\frac{1}{2}\int\limits_{2\pi }^{+\infty }{\frac{\sin x}{x}dx}+\frac{1}{3}\int\limits_{3\pi }^{+\infty }{\frac{\sin x}{x}dx+...}=\frac{\pi }{2}\cdot \left( 1-\ln \pi  \right)$

$\int\limits_{0}^{+\infty }{\frac{\sin \left( \frac{\omega x}{2} \right)}{x\left( {{e}^{x}}-1 \right)}dx}=\frac{1}{4}\cdot \ln \left( \frac{\sinh \left( \pi \omega  \right)}{\pi \omega } \right)$

$\int\limits_{0}^{+\infty }{\frac{1-\cos x}{{{x}^{2}}}{{e}^{-kx}}dx}=\arctan \frac{1}{k}-k\cdot \ln \left( \frac{\sqrt{1+{{k}^{2}}}}{k} \right)$

$\int\limits_{0}^{+\infty }{\sin xsin\sqrt{x}{{e}^{-\alpha x}}dx}=\frac{\sqrt{\pi }}{2}\cdot \frac{\exp \left( -\frac{\alpha }{4}\cdot \frac{1}{1+{{\alpha }^{2}}} \right)}{\sqrt[4]{{{\left( 1+{{\alpha }^{2}} \right)}^{3}}}}\cdot \sin \left( \frac{3}{2}\arctan \frac{1}{\alpha }-\frac{1}{4}\cdot \frac{1}{1+{{\alpha }^{2}}} \right)$

$\int\limits_{0}^{1}{\int\limits_{0}^{1}{\frac{1-{{x}^{2}}}{\left( 1+{{x}^{2}}{{y}^{2}} \right){{\ln }^{2}}\left( xy \right)}dxdy}}=-2\log \left( \frac{2\Gamma \left( \frac{3}{4} \right)}{\Gamma \left( \frac{1}{4} \right)} \right)$

$\int\limits_{0}^{+\infty }{\sin \left( \frac{1}{{{x}^{2}}} \right){{e}^{-\alpha {{x}^{2}}}}dx}=\frac{1}{2}\sqrt{\frac{\pi }{\alpha }}{{e}^{-\sqrt{2\alpha }}}\sin \sqrt{2\alpha }$

$\int\limits_{0}^{1}{\frac{\ln \left( {{x}^{2}} \right)}{\left( 1+{{x}^{2}} \right)\left( {{\pi }^{2}}+{{\ln }^{2}}x \right)}dx}=\ln 2-\frac{1}{2}$

$\int\limits_{0}^{1}{\frac{\ln \left( {{\pi }^{2}}+{{\ln }^{2}}x \right)}{1+{{x}^{2}}}dx}=\pi \ln \left( \frac{1}{2}\sqrt{\frac{\pi }{2}}\cdot \frac{\Gamma \left( \frac{1}{4} \right)}{\Gamma \left( \frac{3}{4} \right)} \right)$

$\int\limits_{0}^{1}{\int\limits_{0}^{1}{\frac{{{x}^{2}}-1}{\left( 1+{{x}^{2}}{{y}^{2}} \right){{\ln }^{2}}\left( xy \right)}dx}dx}=\frac{1}{2}-\frac{2C}{\pi }+\ln \left( \frac{2\sqrt{2}\pi }{{{\Gamma }^{2}}\left( \frac{1}{4} \right)} \right)$

$\int\limits_{0}^{+\infty }{\frac{dx}{\left( {{x}^{2}}+\frac{{{\pi }^{2}}}{4} \right)\cosh x}}=\frac{2\ln 2}{\pi }$

$\int\limits_{0}^{1}{{{\left( tan{{h}^{-1}}x \right)}^{z}}dx}=\frac{\zeta \left( z \right)}{{{2}^{2z-1}}}\cdot \Gamma \left( z+1 \right)\left( {{2}^{z}}-2 \right)\quad z\in \mathbb{N},z\ge 2$

$\int\limits_{0}^{+\infty }{x{{e}^{-x}}{{\left( \int\limits_{0}^{\frac{\pi }{2}}{\left( 1-{{e}^{x-x\csc t}} \right){{\sec }^{2}}tdt} \right)}^{2}}dx}=\frac{1}{3}$

$\int\limits_{0}^{+\infty }{{{e}^{-x}}\ln \ln \left( {{e}^{x}}+\sqrt{{{e}^{2x}}-1} \right)dx}=-\gamma +4\log \Gamma \left( \frac{1}{4} \right)-3\log 2-2\log \pi$

$\int\limits_{0}^{1}{\int\limits_{0}^{1}{\int\limits_{0}^{1}{\left\{ \frac{x}{y} \right\}\left\{ \frac{y}{z} \right\}\left\{ \frac{z}{x} \right\}dxdydz}}}=1+\frac{\zeta \left( 2 \right)\zeta \left( 3 \right)}{6}-\frac{3\zeta \left( 2 \right)}{4}$

$\int\limits_{0}^{\pi }{x\cot \left( \frac{x}{4} \right)dx}=2\pi \log 2+8C$

$\int\limits_{0}^{\frac{\pi }{2}}{x{{2}^{s}}co{{s}^{s}}x\sin \left( sx \right)dx}=\frac{\pi }{4}\cdot \left( \gamma +\psi \left( s+1 \right) \right)$

$\int\limits_{0}^{+\infty }{{{x}^{s-1}}{{\left( \arctan x \right)}^{2}}dx}=\frac{\pi }{2s\sin \frac{\pi s}{2}}\cdot \left( \gamma +\psi \left( \frac{1-s}{2} \right)+2\log 2 \right)$

$\int\limits_{0}^{\frac{\pi }{2}}{xta{{n}^{s}}xdx}=\frac{\pi }{4\sin \frac{\pi s}{2}}\cdot \left( \psi \left( \frac{1}{2} \right)-\psi \left( \frac{1-s}{2} \right) \right)$

$\int\limits_{0}^{+\infty }{\frac{\exp \left( -{{x}^{2}} \right)}{{{\left( {{x}^{2}}+\frac{1}{2} \right)}^{2}}}dx}=\sqrt{\pi }$

$\int\limits_{0}^{+\infty }{\frac{1}{x}\left( \frac{\sinh \alpha x}{\sinh x}-\alpha {{e}^{-2x}} \right)dx}=\log \left( \frac{\pi }{\cos \frac{\alpha \pi }{2}{{\Gamma }^{2}}\left( \frac{\alpha +1}{2} \right)} \right)\quad \left| \alpha  \right|<1$

$\int\limits_{0}^{+\infty }{\frac{\ln \left( {{x}^{2}}+{{\alpha }^{2}} \right)}{\cosh x+\cos t}dx}=\frac{2\pi }{\sin t}\log \left( \frac{\Gamma \left( \frac{\alpha }{2\pi }+\frac{\pi +t}{2\pi } \right)}{\Gamma \left( \frac{\alpha }{2\pi }+\frac{\pi -t}{2\pi } \right)} \right)+\frac{2t}{\sin t}\ln 2\pi$

$\int\limits_{0}^{+\infty }{\frac{{{\left( \sinh \left( sx \right) \right)}^{2}}}{x{{\left( {{e}^{x}}-1 \right)}^{3}}}dx}=\log \left( \frac{2\pi s}{\sin \left( 2\pi s \right)} \right)\quad 0<s<\frac{1}{2}$

$\int\limits_{0}^{+\infty }{\frac{{{x}^{s-1}}\sinh \left( \pi x \right)}{{{\left( \cosh \left( \pi x \right)-1 \right)}^{3}}}dx}=\frac{\Gamma \left( s \right)}{3{{\pi }^{s}}}\cdot \left( \zeta \left( 4-s \right)-\zeta \left( 2-s \right) \right)$

$\int\limits_{0}^{1}{\int\limits_{0}^{1}{\int\limits_{0}^{1}{\sqrt{{{x}^{2}}+{{y}^{2}}+{{z}^{2}}}dxdydz}}}=\log \left( \sqrt{3}+1 \right)-\frac{\log 2}{2}+\frac{\sqrt{3}}{4}-\frac{\pi }{24}$

$\int\limits_{0}^{1}{\int\limits_{0}^{1}{\frac{{{x}^{\alpha -1}}{{y}^{\beta -1}}}{\left( 1+xy \right)\log \left( xy \right)}dxdy}}=\frac{1}{\alpha -\beta }\cdot \log \left( \frac{\Gamma \left( \frac{\alpha }{2} \right)\Gamma \left( \frac{1}{2}+\frac{\beta }{2} \right)}{\Gamma \left( \frac{\beta }{2} \right)\Gamma \left( \frac{1}{2}+\frac{\alpha }{2} \right)} \right)$

$\int\limits_{-\infty }^{+\infty }{\frac{1}{1+\frac{{{x}^{2}}}{{{\alpha }^{2}}}}\cdot \prod\limits_{k=1}^{+\infty }{\frac{1+\frac{{{x}^{2}}}{{{\left( \beta +k \right)}^{2}}}}{1+\frac{{{x}^{2}}}{{{\left( \alpha +k \right)}^{2}}}}dx}}=\sqrt{\pi }\cdot \frac{\Gamma \left( \beta +1 \right)}{\Gamma \left( \alpha  \right)}\cdot \frac{\Gamma \left( \alpha +\frac{1}{2} \right)}{\Gamma \left( \beta +\frac{1}{2} \right)}\cdot \frac{\Gamma \left( \beta -\alpha +\frac{1}{2} \right)}{\Gamma \left( \beta -\alpha +1 \right)}\quad 0<\alpha <\beta +\frac{1}{2}$

$\int\limits_{0}^{+\infty }{\frac{1}{x}\left( \frac{\sinh \left( ax \right)}{\sinh x}-a{{e}^{-2x}} \right)dx}=\log \left( \frac{\pi }{\cos \left( \frac{a\pi }{2} \right){{\Gamma }^{2}}\left( \frac{a+1}{2} \right)} \right)$

$\int\limits_{0}^{+\infty }{{{x}^{2}}{{e}^{-{{x}^{2}}}}erf\left( x \right)\log xdx}=\frac{2-\log 2}{16}\sqrt{\pi }-\frac{\gamma +\log 2}{16\sqrt{\pi }}\left( \pi +2 \right)+\frac{G}{4\sqrt{\pi }}$

$\int\limits_{0}^{\frac{\pi }{2}}{\sin \left( 2nx \right)\sinh \left( a\sin x \right)\sin \left( a\cos x \right)dx}={{\left( -1 \right)}^{n+1}}\frac{\pi }{4}\cdot \frac{{{a}^{2n}}}{\left( 2n \right)!}$

Let $\beta >0$ and $\alpha \in \left( -\frac{\pi }{2},\frac{\pi }{2} \right)$. Prove that $\int\limits_{0}^{+\infty }{{{e}^{-t\cos \alpha }}{{t}^{\beta -1}}\cos \left( t\sin \alpha  \right)dx}=\Gamma \left( \beta  \right)\cos \left( \beta \sin \alpha  \right)$

$\int\limits_{0}^{+\infty }{\frac{\ln \left( 1+x \right)\ln \left( 1+\frac{1}{{{x}^{2}}} \right)}{x}dx}=\pi G-\frac{3}{8}\zeta \left( 3 \right)$

$\int\limits_{-\infty }^{+\infty }{\int\limits_{-\infty }^{+\infty }{\text{sign}\left( x \right)\text{sign}\left( y \right){{e}^{-\frac{{{x}^{2}}+{{y}^{2}}}{2}}}\sin \left( xy \right)dxdy}=2\sqrt{2}\log \left( 1+\sqrt{2} \right)}$

$\int\limits_{0}^{+\infty }{\left( \frac{x}{{{\log }^{2}}\left( {{e}^{{{x}^{2}}}}-1 \right)}-\frac{x}{\sqrt{{{e}^{{{x}^{2}}}}-1}{{\log }^{2}}\left( {{e}^{{{x}^{2}}}}-1 \right)}-\frac{x}{\sqrt{{{e}^{{{x}^{2}}}}-1}\log \left( {{\left( {{e}^{{{x}^{2}}}}-1 \right)}^{2}} \right)} \right)dx}=\frac{G}{\pi }$

$\int\limits_{0}^{1}{{{B}_{2n+1}}\left( x \right)\cot \left( \pi x \right)dx}=\frac{2\left( 2n+1 \right)!}{{{\left( -1 \right)}^{n+1}}{{\left( 2\pi  \right)}^{2n+1}}}\zeta \left( 2n+1 \right)$ where ${{B}_{2n+1}}\left( x \right)$ is the Bernoulli Polynomial

$\int\limits_{0}^{+\infty }{\frac{x}{1+{{x}^{4}}}\arctan \left( \frac{p\sin qx}{1+p\cos qx} \right)dx}=\frac{\pi }{2}\arctan \left( \frac{p\sin \left( \frac{q}{\sqrt{2}} \right)}{{{e}^{\frac{q}{\sqrt{2}}}}+p\cos \left( \frac{q}{\sqrt{2}} \right)} \right)$

Let $m\in \Re$ and $a\in \left( -1,1 \right)$ Calculate
$\int\limits_{0}^{2\pi }{\frac{{{e}^{m\cos \theta }}\left( \cos \left( m\sin \theta  \right)-a\sin \left( \theta +m\sin \theta  \right) \right)}{1-2a\sin \theta +{{a}^{2}}}d\theta }$

Prove that $\int\limits_{0}^{1}{\int\limits_{0}^{1}{\frac{{{\left( xy \right)}^{s-1}}{{y}^{n}}}{\left( 1-xy \right)\log \left( xy \right)}dxdy}}=\frac{\Gamma '\left( s \right)}{\Gamma \left( s \right)}-\frac{\log \left( n! \right)}{n}$

$\int\limits_{0}^{+\infty }{\sin \left( nx \right)\left( \cot x+\coth x \right){{e}^{-nx}}dx}=\frac{\pi }{2}\cdot \frac{\sinh \left( n\pi  \right)}{\cosh \left( n\pi  \right)-\cos \left( n\pi  \right)}$

$\int\limits_{0}^{\frac{\pi }{3}}{{{\log }^{2}}\left( \frac{\sin x}{\sin \left( x+\frac{\pi }{3} \right)} \right)dx}=\frac{5{{\pi }^{3}}}{81}$

$\int\limits_{0}^{2\pi }{{{x}^{2}}\log \left( 1-\exp \left( ix \right) \right)dx}=2\pi \zeta \left( 4 \right)-8i{{\pi }^{2}}\zeta \left( 3 \right)$

100+1. Let $a\in \left( 0,1 \right)$ Prove that $\int\limits_{0}^{1}{\frac{\log \log \frac{1}{x}}{1+2x\cos \left( a\pi  \right)+{{x}^{2}}}dx}=\frac{\pi }{2\sin \left( a\pi  \right)}\left( a\log \left( 2\pi  \right)+\log \frac{\Gamma \left( \frac{1}{2}+\frac{a}{2} \right)}{\Gamma \left( \frac{1}{2}-\frac{a}{2} \right)} \right)$
Bonus

$\int\limits_{0}^{+\infty }{\frac{\cos x}{x}{{\left( \int\limits_{0}^{x}{\frac{\sin t}{t}dt} \right)}^{2}}dx}=-\frac{7}{6}\zeta \left( 3 \right)$

$\int\limits_{0}^{+\infty }{\frac{{{x}^{a-1}}\sin x}{\cos x+\cosh x}dx}={{2}^{1-\frac{a}{2}}}\Gamma \left( a \right)\sin \left( \frac{a\pi }{4} \right)\left( 1-{{2}^{1-a}} \right)\zeta \left( a \right)$

$\int\limits_{0}^{+\infty }{\frac{\cos \left( tx \right)}{\left( 1+{{x}^{2}} \right)\cosh \left( \frac{\pi x}{2} \right)}dx}=\cosh t\log \left( 2\cosh t \right)-t\sinh t$

$\int\limits_{0}^{+\infty }{\frac{{{t}^{s-1}}}{{{z}^{-1}}{{e}^{t}}-1}dt}=\Gamma \left( s \right)\text{L}{{\text{i}}_{s}}\left( z \right)$

$\int\limits_{0}^{+\infty }{\exp \left( -2u \right)\left( \frac{1}{u\sinh u}-\frac{1}{{{u}^{2}}coshu} \right)du}=2-\log 2-\frac{4G}{\pi }$

$\int\limits_{0}^{+\infty }{\frac{\sin \left( bt \right)}{t}{{e}^{-at}}\ln tdt}=-\left( \gamma +\frac{\ln \left( {{a}^{2}}+{{b}^{2}} \right)}{2} \right)\arctan \frac{b}{a}$

$\int\limits_{0}^{1}{\frac{\left( a-t \right)\ln \left( 1-t \right)}{1-2at+{{t}^{2}}}dt}=\frac{{{\pi }^{2}}}{12}-\frac{{{\left( \arccos a-\pi  \right)}^{2}}}{8}-\frac{{{\ln }^{2}}\left( 2-2a \right)}{8}$

$\int\limits_{0}^{1}{{{\left\{ \frac{1}{x} \right\}}^{2}}dx}=\ln \left( 2\pi  \right)-1-\gamma$

$\int\limits_{0}^{1}{{{\left\{ \frac{1}{x} \right\}}^{2}}\left\{ \frac{1}{1-x} \right\}dx}=2+\gamma -\ln \left( 4\pi  \right)$

$$\int\limits_{0}^{1}{{{\left\{ \frac{x}{y} \right\}}^{2}}dxdy}=\frac{1}{2}\ln \left( 2\pi  \right)-\frac{1}{3}-\frac{\gamma }{2}$$
Answer: I like
$$\int_{-\infty}^{\infty } \frac{r \log \left(\frac{\frac{\frac{D^2}{4}+r^2}{D r}+1}{\frac{\frac{D^2}{4}+r^2}{D r}-1}\right)}{\frac{D^2}{4}+r^2} \, dr=\pi^2$$
where $D>0$ (no proof supplied).
If you make the mistake of trying to convert the $\log$ term to its series form, to attempt to integrate term by term, this integral becomes really crazy, an infinite almost fractal cascade of further self similar integrals with the series for $\pi/2$ gradually appearing out of the fog
$$1+\frac{1}{3}\left(\frac{1}{2}\right)+\frac{1}{5}\left(\frac{1}{2}\frac{3}{4}\right)+\frac{1}{7}\left(\frac{1}{2}\frac{3}{4}\frac{5}{6}\right)+...=\frac{\pi}{2}$$
You miss all this underlying structure sensibly driving via the mathematical motorway.
Comment: I don't get this. How is this integral any different from $$\int_{-\infty}^\infty\frac{x\log\frac{x+1}{x-1}}{1+x^2}dx=? {\pi^2\over2} ?$$ Right! I agree through 'cheating' (evaluating it numerically) that it's so ... but I still say all that "D" business & putting it in a perversely complex form is a total red-herring! I get how there is a logarithmic singularity at x=±1 & how the imaginary part is an odd function between them.
Comment: You can derive using partial fraction representation the general case
$$I_n\equiv\int_1^\infty\frac{dx}{x^{2n}(1+x^2)}=(-1)^n\bigg({\pi\over4}+\sum_{k=1}^n{(-1)^k\over2k-1}\bigg)=\bigg|{\pi\over4}+\sum_{k=1}^n{(-1)^k\over2k-1}\bigg|=\sum_{k=0}^\infty{(-1)^k\over 2(n+k)+1}$$ whence $$\int_1^\infty\frac{x\log\frac{1+1/x}{1-1/x}}{1+x^2}dx=2\sum_{n=0}^\infty {I_n\over 2n+1}$$$$=$$$$2\sum_{n=0}^\infty{1\over 2n+1}\sum_{k=0}^\infty{(-1)^k\over 2(n+k)+1}$$
Comment: Likewise for the integral from 0 to 1 ... substitute $x=1/y$ & limits from 1 to $\infty$ & we get a similar series that begins at  $n=1 \therefore$ with $I_1$ in the numerator & $2n-1$ in the denominator. So we get $$\int_0^\infty\frac{x\log\big(\frac{x+1}{x-1}\big)}{1+x^2}$$$$=$$$$\frac{\pi}{2}+2\sum_{n=1}^\infty{n\over n^2-{1\over4}}\sum_{k=0}^\infty{(-1)^k\over 2(n+k)+1}$$$$=$$$$\frac{π^2}{4} ,$$whence the integral over $(-\infty,\infty)$ is $\pi^2/2$. So we could numerically verify that $$\sum_{n=1}^\infty{n\over n^2-{1\over4}}\sum_{k=0}^\infty{(-1)^k\over 2(n+k)+1}={\pi\over8}(\pi-2) .$$
Comment: Just one last thing, and then I'm through - as this is only taking delight in seeing explicitly how the series all pan-out & fit together, really - I'm sure the proper way to do it is something like _Feynmann's trick_ or a _contour integral_, or whatever... but the value of the integral is __π²/2__ ... did you not put that in the first place & then edit it!? I'm _almost_ sure you did.
Comment: @AmbretteOrrisey: The origin of this is an attempt to derive Coulombs law in a different way that is off-topic here. The physical integral is between $0$ and $\infty$, so was equal to $\pi^2/2$. $D$ is the charge separation. At the heart of my attempt at a physical model I ended up with a final integral that is independent of $D$ (the charge separation) which you have investigated in your comments. Physically the integral can be simplified because you can move the origin of the original volume integral from halfway between the charges to co-locate with one of the charges.
Comment: _That's_ where I got the confusion about the "/2" business: in your integral _as you give it_ it's argument is the _square_ of (thing) ... & I just took the square away & then forgot I'd done that. _Now_ I'll have a think about _the rest_ of what you've said!
Comment: I must confess - I can't 'reverse engineer' what it is you're attempting. When I see the logarithms, my first thought is that it's the potential generated by two infinite oppositely charged _line_ charges ... but then I can't imagine why you would then _integrate_ such a potential (afterall, potentials _are_ integrals, and they are usually _differentiated_), especially with a factor of x/(1+x^2) multiplying it. But then ... I suspect I am 'climbing the wrong tree' here!
Answer: We have
$$\int_0^1x\left[{_2}F_1(\tfrac12,1;2;x)\right]^2dx=12-16\ln2,$$
$$\int_0^1 x\left[{_2}F_1(\tfrac13,\tfrac23;\tfrac32;x)\right]^3dx=\frac{27}{32},$$
$$\int_0^1x\left[{_3}F_2(\tfrac14,\tfrac12,\tfrac34;\tfrac23,\tfrac43;x)\right]^4dx=\frac{1792}{2187},$$
and
$$\int_0^1\int_0^1\int_0^1\frac{dtdxdz}{x^{1/2}(1-x)^{1/2}t^{1/4}(1-t)^{5/12}(1-txz)^{1/4}}=\frac{2^{9/4}\cdot11\sqrt{\pi}}{3^{19/8}}\frac{\Gamma(\tfrac13)}{\Gamma(\tfrac14)}\sqrt{\sqrt{3}-1},$$ all from here.

Another cool one:
$$\int_0^\infty\left\{x-\log(2\sinh x)\right\}\cos^2(x)dx=\frac18\left[\frac{\pi^2}{3}+\pi\coth\pi-1\right]$$
Answer: My favorite is:
$$∫(0, 1](-1)^{{\lfloor} {1}/{x^t} \rfloor} dx = 1 - 2η(1/t)$$
step 1: do $u = 1/x^t$
step 2: drag out constants
step 3: split integral from $[1, \infty)$ to ∑(n = 1 -> inf) (∫[n, n+1])
step 4: $(-1)^{\lfloor(u) \rfloor} = (-1)^n$
step 5: the remaining integrals are easy, use $∫x^n dx = \frac{x^{n+1}}{n+1}$
step 6: some tedious series manipulations and transformations
step 7: use that $η(s) =$ ∑ (n = 1 -> inf) $((-1)^{n-1})/(n^s)$
step 8: if you followed instructions closely, you should get $1 - 2η(1/t)$
Comment: please format your answer using [MathJax](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference), it is near impossible to understand in its current format

Request for crazy integrals


Explicit equations for morphism determined by a linear system, Part II

Question: This is a follow-up to this question:
https://mathoverflow.net/q/234967/89715 . I realized my wording was a bit unclear and that I could have been more direct in what I was asking for.
Let me set up the notation once again, for the convenience of the reader. Consider $X = \mathbb{P}^2_k$ and $\mathcal{O}_X(2).$ If we consider the linear system $\mathcal{L}$ of conics passing through the point $[0:0:1]$ we can see that this is spanned by the sections $\{x^2,y^2,xy,yz,xz\}$ and that this linear system defines a rational map $f:X \dashrightarrow \mathbb{P}^4_k.$ Blowing up at the point $[0,0,1]$ we get a surface $p:\tilde{X} \rightarrow X.$ It is then possible to show that we have an extension of $f$ to a map $g: X \rightarrow \mathbb{P}^4_k.$ I want to get an explicit description of this map, in terms of coordinates. Let me tell you my approach, and where I got stumped.
I consider the linear system $\mathcal{L}$ on $X$ generated by $\{x^2,y^2,xy,yz,xz\}$ and pull this back by $p:\tilde{X} \rightarrow X$ to get an invertible sheaf $p^\ast \mathcal{L}$ together with a linear system on $\tilde{X}.$ This new linear system has basepoints along the exceptional divisor $p^{-1}([0:0:1]) \cong \mathbb{P}^1_k.$ This corresponds to an effective Cartier divisor $D,$ so this suggests that we should be able to ''divide out'' by this on $p^\ast \mathcal{L}$ to get a base-point free system. I tried to write down, explicitly how the transformed linear system should look like but I got something that didn't seem to do what I wanted (i.e be base-point free). I would be very glad if someone could help me write down how the linear system would look like, and what corresponding invertible sheaf the linear system would live on. I would also be happy to see how they derived the result.
Comment: Maybe it was better to edit your last question than create a new one? At any rate, I added more comments to your last question.
Comment: Please do not add new questions when an edit will do the job!
Answer: I thought what I said was explicit enough. Let me try again. $\widetilde{X}\subset \mathbb{P}^2\times\mathbb{P}^1=Y$, given by the equation $xu-yv=0$ where $x,y,z$ are coordinates in 2-space as you described and $u,v$ are that of $\mathbb{P}^1$. One can embed $Y$ in $\mathbb{P}^5$ by the map, $(xu,yu,zu, xv,yv,zv)$ (Segre). It is clear that the image of $\widetilde{X}$ is inside the hyperplane given by $T_0-T_4=0$, where $(T_0,\ldots, T_5)$ are the coordinates of $\mathbb{P}^5$.


Content of button is not updated after changing the CurrentUICulture

Question: According to this tutorial, I try to implement the multilingual system to my WPF .NET Core 3.1 application. Everything works fine if I change the property Title of Window element directly, application reads from the corrent resource file, which is is defined by changing the CurrentUICulture.
Here is a code of such a change:
private void BtnChangeLanguageToCsCz_Click(object sender, RoutedEventArgs e)
{
    System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("cs-CZ");
}

private void BtnChangeLanguageToEnUs_Click(object sender, RoutedEventArgs e)
{
    System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
}

However after I click any of these buttons, their content remains unupdated. I feel like I need to call some UI update function or anything like this but can't find anything related so far.
Here is how do I bind the Content property of the Button:
<Button x:Name="BtnInstall" Content="{x:Static p:Resource.ButtonInstall}" HorizontalAlignment="Center" Margin="0,324,0,0" VerticalAlignment="Top" Height="50" Width="200" Click="BtnInstall_Click"/>

Resource files have their modifiers set to public and here are the names:

What should I do to make it update itself?
Comment: https://www.codeproject.com/Articles/299436/WPF-Localization-for-Dummies
Comment: there are no *.Designer.cs files for the files with suffix, because one Resources class is enough: it loads resource according to application current culture from corresponding .resx file. your .resx files should contain translations in xml format, e.g. `Long Wheel Name Translation`
Comment: @ASh Thank you for the tutorial, it really helped. I have rewrited the question.
Comment: Make sure the Build Action of the other resource files are "Embedded Resource"
Comment: @ReeceRussell All the resource files are `Embedded Resource` and the `Copy to Output Directory` value is `Do not copy`, shoudl I change it?
Comment: @Chyuae, `{x:Static }` expression is never updated. I used this localization approach, and it was fine until I needed switch cultures in runtime. so I came up with [my own solution, based on resources](https://github.com/AlexanderSharykin/LibraryCommander/tree/master/Src/LibraryCommander/Localization) - [mainly part is this](https://github.com/AlexanderSharykin/LibraryCommander/blob/master/Src/LibraryCommander/Localization/LocalizationProvider.cs)
Comment: I wonder why there is no .NET built-in solution for this.
Comment: such requirement is somewhat rare. often culture is set once during installation
Answer: A found a solution based on this tutorial, and rather than using the thread's culture or resource.resx files, it uses XAML resource dictionaries.
This can be changed for your case, however, I did this for my MainWindow.xaml:

I created two resource dictionaries called 'MainWindow.en-GB.xaml' and 'MainWindow.cs-CZ.xaml', in a folder named /Resources.
I then set the build action to Content and the Copy to Output Directory to Copy if newer.
Once I created the resource dictionaries, I created an example resource called Text:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:sys="clr-namespace:System;assembly=mscorlib">
        <sys:String x:Key="Text">Hello</sys:String>
</ResourceDictionary>

Then in my MainWindow.xaml, I added the following code:

<Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Resources/MainWindow.en-GB.xaml"></ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

Followed by, setting the button's content to the resource Text:

<Button x:Name="BtnInstall"
    Content="{DynamicResource ResourceKey=Text}"
    HorizontalAlignment="Center"
    Margin="0,324,0,0"
    VerticalAlignment="Top"
    Height="50"
    Width="200"
    Click="BtnInstall_Click" />

Finally, by using the LocUtil from the linked tutorial, calling the LocUtil.SwitchLanguage method, I could change between the two:

private void BtnChangeLanguageToEnUs_Click(object sender, RoutedEventArgs e)
{
    LocUtil.SwitchLanguage(this, "en-US");
}

Comment: I always thought that uploading images takes more effort and less convenient than inserting block of code. But people always do it anyway. I wonder why?
Comment: I have been getting error while adding `` section into the `MainWindow.xaml`, application works fine even without this part of code in it.
Comment: Yes, I'm unable to find any issue.
Comment: Perfect, hope it all goes well!
Comment: @Ash I agree, less convenient; however, I was having issues using the code editor with XML/XAML where it either wouldn't display correctly or at all.
Comment: @ReeceRussell, that happens to xml which is not properly formatted: it should have either triple ` (```) or 4 spaces in front. otherwise it is interpreted as html, but xaml tags don't have visual representation in web, so they end up rendered empty
Comment: @Ash that makes sense! They kept getting rendered empty or missing tags, but thanks for the pointers!
Comment: @ReeceRussell, click "edit" under any post question/answer with xaml in it and you will see formatting
Comment: @ReeceRussell Brilliant!