real analysis – approximation by simple functions, but $ F_k (x) $

I follow the proof to approximate punctual, non-negative measurable functions by simple functions in Stein and Shakarchi (2009).

I am a little confused in their first steps of the cut.

They realize:

To the $ k geq1 $, To let $ Q_k $ denote the cube centered at the origin with one side length $ k $, Then we define
$$ F_k (x) = f (x) space space text {if $ x in Q_k, f (x) leq k $}, \ k space space text {if $ x in Q_k, f (x)> k $} \ 0 space space text {else}. $$
$ F_k (x) rightarrow f (x) $ as $ k rightarrow infty $ for all $ x $,

My questions:

(1) Why do we define $ F_k (x) $ Here. Is this a simple function? I just remember the definition, thinking that the simple function is a finite sum of characteristic functions over a measurable set. I do not understand how $ F $ is related.

(2) Why? $ F_k $ converge selectively $ f $?

Reference:
$ textit {Real analysis: theory, integration and Hilbert spaces measure} $, Elias M. Stein, Rami Shakarchi. Princeton University Press, 2009.

Functions – take data from a.txt file and save it in a list (Python)

Eduardo, below is an example of how the TXT reader could be implemented (leTxt) I have tried to keep the same pattern of function you have set as an example of writing data in txt.

Your code contains too many lists. You may create a class shoe let things be better organized.

import os

def guardaTxt(lstModelo, lstCor, lstNumeracao, lstQtd, lstValorUnit):
    file1 = open("sapataria_dados.txt","w")

    for x in range(len(lstModelo)):
        file1.write(str(lstModelo(x)) + ' ' + str(lstNumeracao(x)) + ' ' + str(lstQtd(x)) + ' ' + str(lstValorUnit(x)) + ' ' + str(lstCor(x))+'n')

    file1.close()

#Função responsável pela leitura dos dados de sapato no arquivo txt, mantendo o mesmo formato da função guardaTxt
def leTxt(lstModelo, lstCor, lstNumeracao, lstQtd, lstValorUnit):
  #Verifica a existência do arquivo antes de abrir
  if os.path.isfile("sapataria_dados.txt"):
    file1 = open("sapataria_dados.txt", "r")

    #Efetua a leitura das linhas do arquivo
    for line in file1.readlines():
      #Quebra a linha lida em uma lista, a cada espaço encontrado é gerado um item na lista
      sapato = line.strip().split(' ')

      lstModelo.append(sapato(0))
      lstNumeracao.append(int(sapato(1)))
      lstQtd.append(int(sapato(2)))
      lstValorUnit.append(float(sapato(3)))
      lstCor.append(sapato(4))

    file1.close()


#Valores que serão gravados no txt
modelos = ("Tradicional", "Esportivo", "Caminhada", "Corrida")
cores = ("Branco", "Azul", "Amarelo", "Vermelho")
numeracoes = (42, 40, 45, 39)
quantidades = (20, 10, 25, 15)
valores = (500, 200, 600, 400)

#Chamada da função que grava os valores no txt
guardaTxt(modelos, cores, numeracoes, quantidades, valores)

txtModelos = ()
txtCores = ()
txtNumeracoes = ()
txtValores = ()
txtQuantidades = ()

#Efetua a leitura do txt no mesmo formato que é feita a gravação
leTxt(txtModelos, txtCores, txtNumeracoes, txtQuantidades, txtValores )

#Exibe os valores que foram lidos do txt
print(txtModelos, txtCores, txtNumeracoes, txtValores, txtQuantidades)

Numerical Integration – Difficulty in the numerical integration of highly oscillating functions

I have the following two integrals that I want to integrate numerically. The function in each integral is the same. They were split because at t = 0 there is a singularity.

p=0.03

    Rzz1(x_?NumericQ, k_?NumericQ) := 1/((Pi) p)
   NIntegrate( (-Log(((2 x - 1 + Sqrt(
           4 x^2 - 4 x + 1 + 4 t^2)) (- 2 x - 1 + Sqrt(
           4 x^2 + 4 x + 1 + 4 t^2)))/(4 t^2)) - 
      Log((-2 x + 1 + Sqrt(4 x^2 - 4 x + 1 + 4 t^2 + 4 p^2))/(- 2 x - 
        1 + Sqrt(4 x^2 + 4 x + 1 + 4 t^2 + 4 p^2)))) Cos(k t), {t, 0, 
    1})



Rzz2(x_?NumericQ, k_?NumericQ) := 
 1/((Pi) p)
   NIntegrate( (-Log(((2 x - 1 + Sqrt(
           4 x^2 - 4 x + 1 + 4 t^2)) (- 2 x - 1 + Sqrt(
           4 x^2 + 4 x + 1 + 4 t^2)))/(4 t^2)) - 
      Log((-2 x + 1 + Sqrt(4 x^2 - 4 x + 1 + 4 t^2 + 4 p^2))/(- 2 x - 
        1 + Sqrt(4 x^2 + 4 x + 1 + 4 t^2 + 4 p^2)))) Cos(k t), {t, 
    1, (Infinity)})


Rzz(x_, k_) := Rzz1(x, k) + Rzz2(x, k)

The values ​​that assume x are given below:

{-0.495, -0.485, -0.475, -0.465, -0.455, -0.445, -0.435, -0.425, 
-0.415, -0.405, -0.395, -0.385, -0.375, -0.365, -0.355, -0.345, 
-0.335, -0.325, -0.315, -0.305, -0.295, -0.285, -0.275, -0.265, 
-0.255, -0.245, -0.235, -0.225, -0.215, -0.205, -0.195, -0.185, 
-0.175, -0.165, -0.155, -0.145, -0.135, -0.125, -0.115, -0.105, 
-0.095, -0.085, -0.075, -0.065, -0.055, -0.045, -0.035, -0.025, 
-0.015, -0.005, 0.005, 0.015, 0.025, 0.035, 0.045, 0.055, 0.065, 
0.075, 0.085, 0.095, 0.105, 0.115, 0.125, 0.135, 0.145, 0.155, 0.165, 
0.175, 0.185, 0.195, 0.205, 0.215, 0.225, 0.235, 0.245, 0.255, 0.265, 
0.275, 0.285, 0.295, 0.305, 0.315, 0.325, 0.335, 0.345, 0.355, 0.365, 
0.375, 0.385, 0.395, 0.405, 0.415, 0.425, 0.435, 0.445, 0.455, 0.465, 
0.475, 0.485, 0.495}

I am mainly interested in the computation of these integrals for different values ​​of k, which is the wavenumber. For example, I tried to compute it for 4.0 * 10 ^ 8, but I was not lucky. I tried different methods, but there are still some mistakes. Any ideas?

Javascript – disable / enable the HTML button based on existing functions

I have a function that is executed by a click of the HTML button, and I must add that the button will be disabled on success, but NOT on return = false.

I've tried to toggle, disable it directly in HTML, and insert the HTML attribute into my current function.

var amtCount = 0;
function addToLineItem() 
{
var totalAmount = 0.0;
var valid = true;
var difference = ();
$.each($(".tbodys tr"),function(index,vs)
{
for(var tdcnt = 0; tdcnt < vs.children.length - 1; tdcnt++)
{
        if(tdcnt != 5)
        if(vs.children(tdcnt).firstElementChild.value == "" || vs.children(tdcnt).firstElementChild.value == undefined)
            valid = false;
    }

    if(vs.children(9).firstChild.value != "" && vs.children(9).firstChild.value != undefined)
    {
        RMID.push(vs.children(9).firstChild.value);
    }
});

if(CodingListItem.length > 0)
{
    difference = arr_diff(CodingListItem,RMID);
}

if(valid == false)
{
alert("Please add Line Items with Required Information.GL coding missing");
    return false;
}

if($("#aprDate").val() == "")
{
    alert("Please add approver date.");
    return false;
}

$.each($(".tbodys tr .nine"),function(index,vs){
    totalAmount += parseFloat(vs.firstElementChild.value.replace(/,/g, ""));
});

if($("#Total")(0).innerText == "")
{
    alert("Please add Line items.");
    return false;
}

//if(parseFloat($("#invTotal").val().replace(/,/g, "")) != totalAmount)
if(parseFloat($("#invTotal").val().replace(/,/g, "")) != parseFloat($("#Total")(0).innerText.replace(/,/g, "")))
{
    alert("Line item's total amount does not match with total invoice amount.");
    return false;
}

 SP.SOD.executeFunc("sp.js", 'SP.ClientContext', function()
 {
    try
    {
        var clientContext = SP.ClientContext.get_current();
        var web = clientContext.get_web();
        var oList = clientContext.get_web().get_lists().getByTitle('Invoice Approval and Coding');


        /////////////   Delete Items   //////////////////
        if(difference.length > 0)
        {
            $.each(difference, function( index, value ) 
            {
                deleteListItem(parseInt(value));
            });
        }


        $.each($(".tbodys tr"),function(i,v)
        {
            if(v.children(9).firstChild.value != "" && v.children(9).firstChild.value != undefined)
            {
                var itemType1 = GetItemTypeForListName("InvoiceLineItem");

                var item1 = {
                    "__metadata": { "type": itemType1 },
                    "Title": v.children(0).firstChild.value,
                    "InvoiceIDId": parseInt(INV),
                    "Entity": v.children(1).firstChild.value,
                    "MS": v.children(2).firstChild.value,
                    "LocationId": parseInt(v.children(3).firstChild.value),
                    "DepartmentId": parseInt(v.children(4).firstChild.value),
                    "Account": v.children(5).children(1).options(v.children(5).children(1).selectedIndex).text,
                    "SubAccount": v.children(6).firstChild.value,
                    "GLCode": v.children(7).firstChild.value,
                    "Amount": v.children(8).firstChild.value
                };

                updateListItem(parseInt(v.children(9).firstChild.value), "Invoice Approval and Coding", _spPageContextInfo.webAbsoluteUrl, item1, function () {

                    amtCount = amtCount + 1;
                    updatePendingInvoice(amtCount); 
                }, function () { errorMsg = true; });
            }
            else
            {
                var itemCreateInfo = new SP.ListItemCreationInformation();
                var oListItem = oList.addItem(itemCreateInfo);  

                oListItem.set_item('Title', v.children(0).firstChild.value);  //Line Description
                oListItem.set_item('InvoiceID', INV); 
                oListItem.set_item('Entity', v.children(1).firstChild.value); 
                oListItem.set_item('MS', v.children(2).firstChild.value); 
                oListItem.set_item('Location', v.children(3).firstChild.value); 
                oListItem.set_item('Department', v.children(4).firstChild.value);
                oListItem.set_item('Account', v.children(5).children(1).options(v.children(5).children(1).selectedIndex).text); 
                oListItem.set_item('SubAccount', v.children(6).firstChild.value); 
                oListItem.set_item('GLCode', v.children(7).firstChild.value); 
                oListItem.set_item('Amount', v.children(8).firstChild.value); 
                oListItem.set_item('Date', $("#aprDate").val()); 
                oListItem.set_item('Comment', $("#cmt").val()); 

                oListItem.update();
                clientContext.executeQueryAsync(onQuerySucceeded, onQueryFailed);
            }
        });


    }
    catch(err)
    {
        alert(err.message);
  }
});
}

function onQuerySucceeded() 
{

amtCount = amtCount + 1;
updatePendingInvoice(amtCount);


}

function onQueryFailed(sender, args) 
{
alert('Few line description not inserted');
}

This works fine. However, if you quickly click the HTML button, the function will run and duplicate data will be created.

How can I create this program with the functions write, malloc and free in C?

• On a 4 x 4 card, place boxes between 1 and 4 in size
For each row and column, the correct number of fields from each view are displayed
possible.

Example: The box of size 3 hides the box of size 1, which implies
from the left there are only 3 visible boxes. From the right, the size box
4 hides the other fields, so there is only one visible field.

• Each view (two per line and two per column) has a specific value
from 1 to 4. Your program must place the boxes correctly and be careful not to
in each row and column have more than a single box of each height.

• If there are multiple solutions, you need to show the first one you find.

• The program is executed as follows:

./rush-01 "col1up col2up col3up col4up col1down col2down col3down col4down row1left row2left
row3links row4links row1rights row2rights row3rights row4rights "

• col1up is the value for the viewpoint from the top of the left column. Each value must be between 1 and 4.

• You must display the resolution in the output as follows:

./rush-01 "4 3 2 1 1 2 2 2 4 3 2 1 1 2 2 2" | Cat -e
1 2 3 4 $
2 3 4 1 $
3 4 1 2 $
4 1 2 3 $

• (see Annexes 2 and 3)

• In case of error only escEnter image description herewill be "error" followed by a line break.Enter image description here

real analysis – Change Brouwer's fixed point set for continuous and limited functions in $ mathbb {R} ^ 2 $ over closed sets

I want to use Brouwer's fixed point set to show this continuous, limited function $ f $ from $ (0, infty) times (0, infty) $ to $ (0, infty) times (0, infty) $ has a fixed point.

However, my version of the Brouwer Fixed Point Theorem (BFPT) states that

To let $ A subset mathbb {R} ^ 2 $ Be a non-empty convex compact set, then every steady one
function $ f: A to A $ has a fixed point in $ A $,

I have to use Brouwer's fixed point set for this problem (by the way, no homework). The main difficulty is that the sets are closed but not compact.

In 1D we have accepted that $ f $ is limited, then let $ M $ be the upper limit of $ f $, this means $ | f | leq M, forall x in (0, infty) $, So we can limit the range of $ f $ to $ (0, M) $ that is compact. Then $ f: (0, M) to (0, M) $ has a fixed point of BFPT.

I am not sure how to upgrade to 2D. I think the idea is similar. But the concept of the upper bound is strange. Can someone help please?

real analysis – reference to a question about subharmonic functions 2

I found something that does not sound right. What's wrong with my proof?

To let $ D $ a limited domain of $ mathbb {R} ^ {N} $ ($ N> 1 $) and $ u $ a subharmonic function $ D $, If $ E $ is a closed subset of $ D $ Without an interior, I'll prove it
$$ u (x) = – int_ {E} G (x, zeta) d mu ( zeta), $$
for all $ x in E $, Where $ G $ is the green function of $ D $ and $ mu $ is the measure associated with Riesz $ u $,

To prove it, I define for all $ n = 1,2, …, $ the $ E_ {n} $ the amount of points $ D $ with a (Euclidean) distnace $ <1 / n $ to the $ E $, Then we have the general Poisson-Jensen formula for each $ n $.
$$ u (x) = int _ { partial E_ {n}} u ( zeta) d omega_ {x} ( zeta) – int_ {E_ {n}} G (x, zeta) d mu ( zeta) $$ for all $ x $ in an open set $ E_ {n} $, Now we fix $ x in E $ and let it go $ n to infty $, The first integral $ to0 $, because when $ chi_ {n} $ denotes the characteristic function of $ partial E_ {n} $, then
begin {equation}
lim_ {n to infty} chi_ {n} (x) = 0
end {equation}

for all $ x in B_ {N} $, The second integral
$$ to int_ {E} G (x, zeta) d mu ( zeta) $$
there $ chi_ {E_ {n}} to chi_ {E} $,

Could someone explain what is wrong with my proof? The result does not seem to be healthy.