Smartphone region-wise image indoor localization using deep learning for
indoor tourist attraction

Gabriel Toshio Hirokawa Higa1*¤, Rodrigo Stuqui Monzani2, Jorge Fernando da
Silva Cecatto2, Maria Fernanda Balestieri Mariano de Souza3, Vanessa Aparecida
de Moraes Weber4, 5, Hemerson Pistori1, 2, Edson Takashi Matsubara2,

1 Dom Bosco Catholic University, Campo Grande, MS, Brazil

2 Federal University of Mato Grosso do Sul, Campo Grande, MS, Brazil

3 Pantanal Biopark, Campo Grande, MS, Brazil

4 State University of Mato Grosso do Sul, Campo Grande, MS, Brazil

5 Kerow Precision Solutions, Campo Grande, MS, Brazil

¤Current Address: Dom Bosco Catholic University, Campo Grande, MS, Brazil

*<EMAIL_ADDRESS>
## Abstract

Smart indoor tourist attractions, such as smart museums and aquariums, usually
require a significant investment in indoor localization devices. The
smartphone Global Positional Systems use is unsuitable for scenarios where
dense materials such as concrete and metal block weaken the GPS signals, which
is the most common scenario in an indoor tourist attraction. Deep learning
makes it possible to perform region-wise indoor localization using smartphone
images. This approach does not require any investment in infrastructure,
reducing the cost and time to turn museums and aquariums into smart museums or
smart aquariums. This paper proposes using deep learning algorithms to
classify locations using smartphone camera images for indoor tourism
attractions. We evaluate our proposal in a real-world scenario in Brazil. We
extensively collect images from ten different smartphones to classify biome-
themed fish tanks inside the Pantanal Biopark, creating a new dataset of 3654
images. We tested seven state-of-the-art neural networks, three being
transformer-based, achieving precision around 90% on average and recall and
f-score around 89% on average. The results indicate good feasibility of the
proposal in a most indoor tourist attractions.

## Introduction

The Pantanal Biopark111Biopark Pantanal, as the official name goes in
Portuguese. is a state public aquarium located in Campo Grande (20° 45’
60.189” S latitude and $-$54° 58’ 07.123” W longitude), Mato Grosso do Sul,
Brazil. It is the largest freshwater aquarium in the world, with 19 thousand
m2 of built area and more than 5 million liters of water in 93 tanks, 70 of
which are dedicated to research and conservation. Over 359 species of animals
from the Pantanal and other regions are present in thematic tanks, offering
visitors the experience of the main Brazilian ecosystems, including chimney
springs, floodplains, and footpaths.

In addition to the purpose of tourism, the Biopark was designed as an
educational environment, within which new tools shall be developed and made
available for visitors to use, incorporating state-of-the-art technologies,
especially those from the Artificial Intelligence (AI) field, into the
learning experience. One of these tools is a smartphone app that automatically
identifies the thematic tank the visitor is pointing to the camera. The image
classification, where the classes represent fish tank locations, enables an
essential function of this application to allow the visitors to locate
themselves inside the Biopark.

Indoor localization inside Biopark using mobile phones is a challenging task.
This problem is familiar to most indoor tourist attractions since, in most
cases, these places are built with metallic structures and concrete due to
their architectural construction. Traditional GPS methods are inaccurate
inside such places since the structures block the GPS signal. There are
several approaches to solving this type of problem, the most famous among them
being the location by wireless technologies, such as Wi-Fi and Bluetooth.
However, physical resources would still be needed to allow the location of
visitors. Therefore, a cheaper alternative is to develop technologies that do
not require the installation of any infrastructure but use the technology
already available. Our proposal explore a well-known approach to region-wise
localization by using image classification. The main idea lies in the
combination of image classification of the fish tank and prior knowledge of
the arrangement of tanks in the park, which enables a simple yet effective
indoor localization system.

The main contributions of this paper are:

  * •

A novel image dataset with 3654 images from 24 different fish tanks
(locations), 23 indoor locations, and one outdoor location of Biopark
Pantanal;

  * •

An experimental evaluation of seven deep learning algorithms, where we focused
on the proposal’s applicability by selecting small and medium-size models that
anyone with a standard GPU can train. Also, the small models can fit on any
standard mobile phone device; and

  * •

A discussion of how an indoor localization system based on the new dataset
shall work.

## Related works

The goal of the learned model in this paper is to consider as an input an
image and the output is the location (fish tank name), which at Biopark
Pantanal refers to the biomes that the tanks purport to mimic. The complex
backgrounds and the fish species are central features of the classification.
It is also worth noticing that images captured underwater through a glass
panel, as is the case with images captured in an aquarium, present their
peculiarity, such as light distortions because of light coming through the
surface of the water (see, for instance, Figure 1). Therefore related works to
this study include fish tank classification, fish classification, and indoor
localization using deep learning.

Fig 1: a fish in the Banhados tank.

Ubina et al. [1] addressed fish tank detection with deep learning techniques.
In their work, the authors created a complex system using drones to automate
different tasks (not only fish-related ones but also security surveillance
tasks) in fish aquaculture sites. Their system did include the detection of
aquaculture tanks using deep learning. Their problem was, however, clearly
very different from the one addressed in this work, not only because of how
the images were captured but also because the tanks were only classified
amongst other kinds of objects (such as people and boats), and not amongst
themselves, as tanks diversely themed according to different aquatic
environments.

Most research on the application of deep learning in fish-related sciences up
until now has focused on underwater images captured in marine environments.
Zhao et al. [2] reviewed the application of machine learning techniques in the
field of intelligent aquaculture, indicating that there are good results in
the task of fish species classification (with an accuracy usually above 90%,
frequently reaching 98%, and even going above 99% in at least one case
reported in their work), but also that these results are highly dependent on
the dataset and on the environmental conditions. The preferred datasets are
the Fish4Knowledge dataset and versions of the LifeCLEF dataset. Many works
address the complexity of the environments. Salman et al. [3], for example,
addressed the issue of complex backgrounds (originating from complex
environments) in underwater video processing by using a hybrid model
consisting of gaussian mixture modeling and optical flow. Ju and Xue [4] also
addressed the problem of complex backgrounds by proposing the Fish_AlexNet, a
neural network based on the AlexNet, improved with an item-based soft
attention mechanism. These works show that fish image classification is now a
well-established field addressing its difficulties in their specificities.

Looking at indoor localization literature, Félix et al. [5] proposed in 2016
the use of deep learning on indoor localization. The authors evaluate the
fingerprinting of the Wi-FI access point. Since 2016, deep learning models
have evolved immensely, and now deep learning for mobile devices is a very
feasible approach. Shao et al. [6] transformed Wi-Fi and magnetic field
fingerprints into an image-like structure and processed it with a
convolutional neural network. Their result shows an impressive under one-meter
error distance using different smartphone orientations. Although the result is
satisfying, they used Wi-Fi and magnetic fields as the primary input, which is
not our case.

Liu et al. [7] proposed a system for indoor localization that uses both place
and object recognition in images to map pictures into environments. Their
primary input uses RGB images from the camera, where SURF, FLANN, and RANSAC
preprocess the images to identify keyframes. The proposal submits the
keyframes to a Deep Learning Object detection and performs the localization.
Although the results are promising, their proposal requires server-client
architecture to process all images due to its computational demands.

Bai et al. [8] presents a survey on deep learning image-based approach. Most
works at that time do not implement deep learning end-to-end approaches but
the combination of traditional computer vision methods (ex. SIFT, SURF, BOVW)
with deep learning. Another interesting observation in this review is that
most papers perform a multi-fusion of an image, WIFI fingerprinting,
gyroscope, and accelerometer data.

The problem of classifying tanks seems to be an open question. Few steps have
been taken lately toward its solution, and there are good reasons to speed up.
Being in a different context, Sergi et al. [9] proposed a system that is
related to ours in its spirit: enhancing educational tourism and learning
experiences with deep learning. In their case, the proposed system used image-
matching deep learning techniques to enhance the fruition of cultural tourism.
The system can display information on cultural points of interest by matching
user input into reference images stored in the system. In the case of this
work, the techniques use image classification. As the authors say, it is
possible to enhance the experience of learning about culture with artificial
intelligence tools. The same can be said about biomes and aquatic fauna: it is
possible to enhance the experience of learning about them with AI. Of course,
the correct identification of biome-themed fish tanks is necessary. Therefore,
in this step, we contribute by presenting an artificial neural network to
classify biome-themed fish tank images.

## Proposal

The proposal follows a standard pipeline of a fingerprinting localization
problem: it starts with an image capture, followed by a deep learning image
classification to identify the fish tank, and finally, the match of the fish
tank name and the localization. By accessing an indoor localization system
based on smartphone cameras, a user must be able to input a picture of the
tank and get their localization as an answer. For example, for Figure 1, the
system should inform the user that they are looking at the Wetlands-themed
tank. The system may also return additional information and trivia about the
tank and the species. Although this approach has already been used in many
different applications, to the best of our knowledge, our study is the first
to evaluate this approach in a fish tank aquarium, where specific indoor light
and environmental conditions are presented, in which we believe that can
generalizes in other similar indoor tourist attraction.

In this work, we consider two ways to process the input data: online and
offline. For online processing, options vary from having an actual server
working in the Biopark to using cloud computing; therefore, we can use GPUs
and bigger networks. For offline processing, it is possible to embed a smaller
model through the smartphone application and run it in the user’s smartphone.
These options require that many factors be considered, especially in this
paper’s context, the performance of smaller networks that can run in
smartphones in comparison with larger neural networks, which require more
computational power and may achieve better performance.

In principle, using the aforementioned models, it is possible to identify a
tank from an image captured by a smartphone. In addition, it is also possible
to observe that even networks with a smaller number of parameters present
acceptable results for this task. These facts support creating a mobile
application that can work online, making requests to an external network
allocated on a server or offline since it is possible to embed the networks
presented in an application.

## Materials and methods

### Dataset

The dataset classes are based on the Pantanal Biopark tank division. The tanks
represented in the dataset are: Africa, America, Asia, Waterfall Bay,
Pufferfish, Wetlands, Amazon Rapids, Europe, Creeks, Caiman, Australian Lake,
Mimicry, Neotropic, Oceania, Electric Fish, Flooded Plain, Flooded Plain
(Flooding), Resurgence, Rivers of Bonito, Rivers of the Pantanal, Veredas and
External. Figure 2 shows the map of the fish tank used in this proposal.

Fig 2: A 2D map of Pantanal Biopark

The images from the tanks were taken on May 21st, 2022, at 2 pm, by a group of
9 students from the Federal University of Mato Grosso do Sul (UFMS) in a tour
guided by Prof. Edson Takashi Matsubara, who also contributed to the
collection. The students were instructed to use their smartphones to collect
as many images as possible with different angles and light conditions. In
addition, it was also requested that there be a balance between the number of
images recorded in each tank to avoid imbalance between classes. Table 1 shows
the smartphone models, the resolutions of their cameras, and the number of
images taken using each one, both in total and percentage. From the 31 tanks
available, only 24 were used in this work, as the tanks with fewer than 50
images were removed because the deep learning techniques required more images
to learn. In total, there are 3654 images of 24 tanks. Table 2 shows the
number of images of each tank. In Figure 3, it is possible to see one sample
image from each tank.

Among the main species of each habitat, the following stand out:

  * •

Africa: african cichlid, petricola catfish (Synodontis petricola) and
featherfin chichlid (Cyathopharynx furcifer);

  * •

America: triangle cichlid waroo (Uaru amphiacanthoides), porcupinefish
(Geophagus spp.), true parrotfish (Hoplarchus psittacus),bandit cichlid
(Guianacara dacrya), armored catfish, serverum (Heros severus), silver dollar
(Leporinus) and pike cichlid (Crenicichla spp.);

  * •

Asia: barb, clown loach (Chromobotia macracanthus), Hara jerdoni (Botia
kubotai), Black shark minnow (Epalzeorhynchos bicolor), Three-striped
corydoras (Trichopodus leerii), Aurelius Barb (Dawkinsia arulius), Golden barb
(Barbodes semifasciolatus) and Yo-yo loach (Botia lohachata);

  * •

Waterfall Bay: piraputanga (Brycon hilarii), armored catfish, Pantanal catfish
(Pimelodus pantaneiro), swamp eel (Synbranchus spp.), schizodon (Schizodon
borellii), silver dollar (Leporinus friderici), silver prochilod (Mylossoma
duriventre), large-headed leporinus (Megaleporinus macrocephalus), and
tortoise;

  * •

Pufferfish: Amazon pufferfish (Colomesus asellus), greenbottle pufferfish
(Auriglobus nefastus);

  * •

Wetlands: piraputanga (Brycon hilarii), curimata-serrasalmid (Prochilodus
lineatus), thicklip cichlid (Cichasoma dimerus), spotted pike cichlid
(Crenicichla lepidota) and African butterfly fish (Markiana nigripinnis);

  * •

Amazon Rapids: zebra pleco (Hypancistrus zebra), Hypancistrus catfish
(Hypancistrus sp.), golden nugget pleco (Baryancistrus xanthellus),
Baryancistrus catfish, cactus plecos (Pseudacanthicus spp.), sailfin plecos
(Leporacanthicus spp.), flagtail prochilod (Acnodon Normani) and bloodfin
tetra (Moenkhausia heikoi);

  * •

Europe: rainbow trout (Oncorhynchus mykiss);

  * •

Creeks: Panda corydoras (Corydoras panda), Neon tetra (Paracheirodon innesi),
Green neon tetra (Paracheirodon simulans), Glowlight tetra (Hemigrammus
erythrozonus) Nego d’água (Hyphessobrycon negodagua), Diamond tetra
(Moenkhausia pittieri), Tetra Peugeot (Hyphessobrycon Peugeot), Lemon tetra
(Hyphessobrycon pulchripinnis) Penguin tetra (Thayeria boehlkei), Costae tetra
(Moenkhausia costae), Rummy-nose tetra (Hemigrammus bleheri), Cardinal tetra
(Paracheirodon axelrodi), Spotted headstander (Chilodus punctatus), Cruzeiro
do Sul (Hemiodus gracilis), Altum angelfish (Pterophyllum altum) and Discus
fish (Symphysodon discus);

  * •

Caiman: broad-snouted caiman (Caiman Latirostris), black belt cichlid
(Aequidens plagiozonatus), flag acara (Bujurquina vittata), thicklip cichlid
(Cichlasoma dimerus), black tetra (Moenkhausia dichroura) and silver dollar
fish (Tetragonopterus argenteus);

  * •

Australian Lake: Rainbowfish;

  * •

Mimicry: Dwarf corydoras (Corydoras hastatus), Lips (Hemigrammus mahnerti),
Krieg’s tetra (Serrapinnus kriegi), Serpae tetra (Hyphessobrycon eques), Black
Phantom tetra (Hyphessobrycon megalopterus), Lips (Hyphessobrycn elachys) and
Armored catfish;

  * •

Neotropic: Brazilian dourado (Salminus brasiliensis), stingray, pintado
(Pseudoplatystoma corruscans), Tambaqui (Colossoma macropomum), thorny catfish
(Oxydoras kneri), Astyanax (Astyanax lacustres), spine-bellied jupiaba
(Jupiaba acanthogaster), Pirarucu (Arapaima gigas), disk tetra (Myleus
schomburkii), armored catfish, silver dollar, red head tapajos (Geophagus
spp.), silver arowana (Osteoglossum bicirrhosum), redtail catfish
(Phractocephalus hemeliopterus) and pike cichlid (Crenicichla spp.);

  * •

Oceania: archerfish (Toxotes jacutrix), archerfish (Toxotes jaculatrix),
fingerfish (Monodactylus sabae) and silver moony (Monodactylus argenteus);

  * •

Electric Fish: Black ghost knifefish (Apteronotus spp.);

  * •

Flooded Plain: Marbled headstander (Abramites hypselonotus), Armored catfish,
stingray, Canivete (Leporinus striatus), Catfish (Auchenipterus osteomystax),
serrasalmid (Myloplus levis), Pejerrey (Schizodon isognathus), Black tetra
(Gymnocorymbus ternetzi), Argentine humphead (Gymnogeophagus balzanii),
Astyanax (Astyanax alleni), Sardinha (Triportheus pantanensis) and whiptail
armored catfish (Loricaria spp.);

  * •

Flooded Plain (Flooding): papudinho (Poptella paraguayensis), Astyanax
(Psalidodon marionae), flag cichlid (Mesonauta festivus) and Redeye tetra
(Moenkhausia forestii);

  * •

Resurgences: jewel tetra (Hyphessobrycon eques), whiptail armored catfish,
tetra (Moenkhausia bonita) and saguiru (Toothless characin);

  * •

Rivers of Bonito: Piraputanga (Brycon hilarii), thicklip cichlid (Cichlasoma
dimerus), Pike cichlid (Crenicichla lepidota), Armored catfish, stingray, ray-
finned fish (Prochilodus lineatus), Astyanax (Psalidodon marionae, Jupiaba
acanthogaster, Hyphessobrycon luetkeni, Moenkhausia bonita), Canivete
(Leporellus vittatus, Leporinus striatus), Duro-duro (Parodon nasus),
Headstander (Megaleporinus obtusidens), stingray and tiger shovelnose catfish
(Pseudoplatysto reticulatum);

  * •

Rivers of the Pantanal: thorny catfish (Oxydoras kneri), stingray
(Potamotrygon spp.), Armored catfish, Gilded catfish (Zungaru jahu), Brazilian
dourado (Salminus brasiliensis), serrasalmid (Piaractus mesopotamicus), pike
characin (Acestrorhynchus pantaneiro) and Pterodoras granulosus (Pterodoras
granulosus);

  * •

Veredas: Armored catfish, Astyanax (Astyanax sp.), Tetra (Hyphessobrycon
langeani), Angelfish (Aequidens sp.), Chum-chum (Pimelodella spp.) and Silver
Dollar (Leporinus sp.);

  * •

External: Armored catfish, Jurupensém (Sorubim lima), Oscar (Astronotus
crassipinnis), serrasalmid (Metynnis mola), Sardinha (Triportheus
pantanensis), headstanders (Leporinus lacustris) and Pike cichlid (Crenicichla
vittata);

Table 1: Description of each smartphone used to build the dataset, including the number and percentage of images. Model | Specification | # Images | Percentage
---|---|---|---
Apple iPhone XR | 12 Mp | 264 | 7.22%
Samsung S20+ | 12 Mp/64 Mp/12 Mp | 316 | 8.65%
Realme 7 Pro | 64 Mp/8 Mp/2 Mp/2 Mp | 181 | 4.95%
Xiaomi Pocophone F1 | 12 Mp/5 Mp | 109 | 2.98%
Redmi Note 8 | 48 Mp/8 Mp/2 Mp/2 Mp | 148 | 4.05%
Samsung A30 | 16 Mp/5 Mp | 316 | 8.65%
Samsung S7 | 12 Mp | 627 | 17.16%
Samsung S22 | 50 Mp/12 Mp/10 Mp | 481 | 13.16%
Xiaomi Mi 8 Lite | 12 Mp/5 Mp | 829 | 22.69%
Samsung M51 | 64 Mp/12 Mp/5 Mp/5 Mp | 383 | 10.48%
Table 2: Number and percentage of images from each tank used in the
experiment. The table also shows a brief description of the biome that the
tank represents.

Tanks | # Images | Percentage
---|---|---
Africa | 265 | 7.25%
America | 196 | 5.36%
Asia | 61 | 1.67%
Waterfall bay | 170 | 4.65%
Pufferfish | 110 | 3.01%
Wetlands | 59 | 1.61%
Amazon rapids | 78 | 2.13%
Europe | 182 | 4.98%
External | 212 | 5.80%
Creeks | 116 | 3.17%
Caiman | 85 | 2.33%
Australian lake | 143 | 3.91%
Mimicry | 116 | 3.17%
Neotropic | 229 | 6.27%
Oceania | 104 | 2.85%
Cavefish | 81 | 2.22%
Electric fish | 85 | 2.33%
Flooded plain | 264 | 7.22%
Flooded plain (flooding) | 233 | 6.38%
Flooded plain (dry) | 95 | 2.60%
Resurgences | 71 | 1.94%
Rivers of Bonito | 413 | 11.30%
Rivers of Pantanal | 172 | 4.71%
Paths | 114 | 3.12%

(a) Africa

(b) America

(c) Asia

(d) Waterfall bay

(e) Pufferfish

(f) Wetlands

(g) Amazon rapids

(h) Europe

(i) External

(j) Creeks

(k) Caiman

(l) Australian Lake

(m) Mimicry

(n) Neotropic

(o) Oceania

(p) Cavefish

(q) Electric fish

(r) Flooded plain

(s) Flooded plain (flooding)

(t) Flooded plain (dry)

(u) Resurgences

(v) Rivers of Bonito

(w) Rivers of the Pantanal

(x) Veredas

Fig 3: One image sample from each tank used in the experiment.

### Neural Networks

The task at hand is classifying tank images according to the thematic tanks.
In the field of computer vision, the use of convolutional neural networks has
achieved remarkable results. In the last few years, another similar but
ultimately different kind of technology has become the object of interest in
the field: vision transformers.

In 2017, the work of Vaswani et al. [10] in the field of natural language
processing resulted in this new kind of neural network, the transformers, a
smaller neural network that achieved state-of-the-art results by making use of
an attention mechanism called scaled dot-product attention and much fewer
convolutional layers. In 2020, Dosovitskiy et al. [11] proposed a sort of
“pure” transformer for computer vision tasks, precisely the Vision Transformer
(ViT) . Recognizedly, their work was not the first in which the use of
transformers was attempted in Computer Vision. However, as the authors claim,
it was the first that showed that a transformer could be used in a “pure”
state (i.e., without mixing a transformer-based architecture with a
convolutional approach) and achieve state-of-the-art results.

Vision transformers have become a hot topic in Computer Vision ever since. New
transformer-based architectures and new transformer-with-convolution-based
architectures have been proposed in the last few years. Given that this is how
things stand, the proposed experiment shall compare the performance of the
following neural networks: Resnet18, MaxViT, LamHaloBotNet, LambdaResnet.
Furthermore, given the proposal described in Section Proposal, we also test
and compare three relatively smaller networks: EfficientNet, DenseNet and
MobileNet. All networks will be compared to their performance differences
given their sizes, which will form the basis for deciding whether the networks
should be processed online or on the users’ smartphones.

Below, we comment briefly on each one of the architectures evaluated. Also,
Table 3 shows the number of parameters of each network.

  * •

Resnet18222In this work, we use the PyTorch/Torchvision implementation.:
Residual networks were proposed by He et al. [12] in 2015 as a way to deal
with the fact that the increase in depth of a neural network eventually leads
to a degradation in accuracy, when the network gets too deep. The main idea is
to adjust the weights in a group of layers with reference to the input given
to that group. This reference is accomplished by adding the input itself (as
it originally is, or linearly transformed if so required by the
dimensionality) to the output of the layers, which makes optimization easier.

  * •

MaxViT333In this work, we tested the MaxViT-T as implemented in PyTorch Image
Models [13] (timm; baptized in implementation as maxvit_rmlp_tiny_rw_256),
available here: https://github.com/rwightman/pytorch-image-models.: Multi-Axis
Vision Transformers were proposed in 2022 by Tu et al. [14]. In fact, the
authors proposed, first and foremost, a transformer module called multi-axis
self-attention, and what is here called MaxViT is the neural network, also
proposed by the authors, composed by blocks constituted by the module and
convolutional layers. It is, therefore, a hybrid architecture, both
transformer- and convolution-based. In short, the fundamental idea of the new
block is to use block attention, attention over windows of the input map, to
get local information, and grid attention, attention diffused across smaller
pieces distributed across the input map, to get global spatial information.
The purpose is to improve the model capacity of the transformer, while keeping
computational costs low.

  * •

LambdaResnet and LamHaloBotNet444Both available here:
https://github.com/rwightman/pytorch-image-models as well. Wightman [13],
maintainer of the implementations, considers them “experimental variants”.:
these are Neural Networks implemented in PyTorch Image Models in a “bring-
your-own-blocks” fashion. They make use of various attention mechanisms.
Lambda layers, as well as LambdaResnets, were proposed in 2021 by Bello [15].
LambdaResnets are Resnets in which the bottleneck blocks were substituted by
lambda layers. Lambda layers were proposed as a way to model contextual
information out of the self-attention framework, as a way to reduce memory
cost. HaloNets were proposed in 2021 by Vaswani et al. [16]. The authors
explore the similarities between self-attention and convolution, and propose
to apply self-attention by getting queries from blocks established on the
input, and keys and values from a window created around the query block,
including this block itself. Bottleneck transformers are a kind of
architectural design whose importance was pointed out by Srinivas et al. [17].
In short, it consists in the possibility of replacing convolutions with the
transformer’s multi-head self-attention in certain cases, such as that of the
bottleneck block of ResNets.

  * •

EfficientNet: the family of EfficientNet networks was proposed by Tan and Le
[18] as the result of a research on how to efficiently scale deep neural
networks up. In their work, the authors proposed a compound scaling method to
scale network depth, width and resolution in a uniform way. To test their
method, they proposed a baseline EfficientNet-B0, along with efficiently
scaled up versions from B1 up to B7. In this work, we evaluate the B2 version.

  * •

MobileNetV3: the MobileNetV3 networks were proposed by Howard et al. [19], and
constitute the third generation of MobileNets. This family of networks was
conceived within the ideal of optimizing neural networks for mobile devices.
In this third generation, important changes were introduced, such as the
redesign of layers and the use of the hard swish as non-linearity.

  * •

DenseNet121555In this work, we used the Pytorch/Torchvision implementation.:
Densely Connected Convolutional Networks were introduced by Huang et al. [20].
In their work, the authors proposed a network design where the output feature
maps of each layer are used as inputs to all subsequent layers, and all
subsequent layers have as inputs the feature maps of all preceding layers, up
until the input image. The objective was to improve the flow of information
and gradient throughout the layers, by sharing the feature maps across the
entire network. With this idea, the authors managed to achieve results that
were close to the state-of-the-art with a smaller number of parameters.

Table 3: Number of parameters of each neural network evaluated in this work. Architecture | # Parameters
---|---
Resnet18 | 11,689,512
MaxViT | 29,148,896
LambdaResnet | 10,988,688
LamHaloBotNet | 22,569,824
EfficientNet | 9,109,994
MobileNetV3 | 5,483,032
DenseNet121 | 7,978,856

### Experimental Setup

The selected network architectures’ weights were adjusted by the Adaptive
Moment Estimation (Adam) optimizer. The combinations were tested using a
stratified 10-fold cross-validation sampling strategy. In each fold, 20% of
the training data was used for validation. The maximum possible number of
epochs was 1000. However, validation loss values were monitored for early
stopping, with a tolerance of 0.1 and 30 epochs of patience. The architectures
were initialized with the available pre-trained weights (transfer learning) in
all cases. The images were resized to (256, 256) since this is the required
image size for all the neural network implementations utilized. The following
data augmentation techniques were used: random horizontal and vertical flips,
with a probability of 0.5; random 90-degree rotation; random crop; and random
perspective alterations.666Implemented in Torchvision as RandomHorizontalFlip,
RandomVerticalFlip, RandomRotation, RandomCrop, and RandomPerspective. The
weights were optimized using a learning rate of 0.001. The training was
performed in batches of 12 images.

The results were used to calculate statistics for three performance metrics:
precision, recall, and f-score. A one-way ANOVA hypothesis test was used to
compare the effects of architecture variation on each performance metric. The
chosen significance level was 5%. The Scott-Knott clustering test followed
each ANOVA to specify the statistically different architectures. The ANOVA and
the post-hoc Scott-Knott tests were conducted in the R programming language.
For the ANOVA, the R Stats Package was used. The Scott-Knott clustering test
was performed with the ScottKnott package [21]. Boxplots, confusion matrices
and Receiver Operating Characteristic (ROC) curves were also produced and used
in the analysis.

## Results and Discussion

Figure 4 shows boxplots for precision, recall, and f-score for each
architecture across ten folds. Table 4 shows the median, interquartile range
(IQR), mean, and standard deviation (SD) for precision, recall, and f-score
for each architecture. Figure 5 compares the number of parameters of each
neural network with the f-score results achieved by them. Considering the
convex hull of the graph, MobileNetV3, DenseNet121, and LambdaResnet are the
best trade-off of F-score and number of parameters.

Table 4: Precision, recall and f-score statistics for each architecture.
Scott-Knott clustering test results are presented as capital letters next to
the mean values. Precision
---
Architecture | Median | IQR | Mean | SD
Resnet18 | 0.8388610 | 0.0427257 | 0.8431657 a | 0.0488431
MaxViT | 0.7258782 | 0.1445138 | 0.7181872 b | 0.1013066
LambdaResnet | 0.8943776 | 0.0129604 | 0.8891400 a | 0.0190454
LamHaloBotNet | 0.8587547 | 0.0815401 | 0.8371838 a | 0.0646207
EfficientNet | 0.8450530 | 0.0396771 | 0.8416580 a | 0.0376566
MobileNetV3 | 0.8364602 | 0.1048045 | 0.8118989 a | 0.0654814
DenseNet121 | 0.8692268 | 0.0290350 | 0.8665466 a | 0.0268982
Recall
Architecture | Median | IQR | Mean | SD
Resnet18 | 0.8234125 | 0.0676031 | 0.8222047 a | 0.0594642
MaxViT | 0.6753436 | 0.1295495 | 0.6924280 c | 0.0916703
LambdaResnet | 0.8787862 | 0.0385103 | 0.8775279 a | 0.0253155
LamHaloBotNet | 0.8438065 | 0.0541796 | 0.8224366 a | 0.0750914
EfficientNet | 0.8360617 | 0.0279304 | 0.8268298 a | 0.0367740
MobileNetV3 | 0.7977565 | 0.1230585 | 0.7743310 b | 0.0786110
DenseNet121 | 0.8410389 | 0.0391698 | 0.8431819 a | 0.0286452
F-score
Architecture | Median | IQR | Mean | SD
Resnet18 | 0.8201954 | 0.0615506 | 0.8208287 a | 0.0614754
MaxViT | 0.6638640 | 0.1360363 | 0.6806592 b | 0.0962083
LambdaResnet | 0.8712313 | 0.0343017 | 0.8745617 a | 0.0212171
LamHaloBotNet | 0.8429809 | 0.0691919 | 0.8183138 a | 0.0762315
EfficientNet | 0.8249585 | 0.0364336 | 0.8217447 a | 0.0419911
MobileNetV3 | 0.8007643 | 0.1366063 | 0.7699452 a | 0.0809824
DenseNet121 | 0.8415972 | 0.0158589 | 0.8439717 a | 0.0258583

The ANOVA test resulted in highly significant results, with p-values of
$4.9\cdot 10^{-7}$ for precision, $2.46\cdot 10^{-7}$ for recall and
$1.31\cdot 10^{-7}$ for f-score. Also, in Table 4, the results of the Scott-
Knott clustering test applied for each metric are presented next to the mean
values. The architectures with the same letters were clustered and are not
statistically different.

Fig 4: Boxplot for each architecture used in the experiment. Fig 5: Number of
parameters vs. f-score results for each architecture.

Figures 6 and 7 show the Receiver Operating Characteristic (ROC) curves for
LambdaResnet (11 million parameters), which achieved the highest average
performance, as it is possible to see in Table 4, and for the MobileNetV3
architecture (5.4 million parameters), which is the smallest architecture
evaluated in this work, as can be seen in Table 3. These curves were
calculated with a One-vs-Rest strategy, which means that the number of classes
and the fact that they are imbalanced may have affected the results.
Nonetheless, the ROC curves present an AUC higher than 0.98, indicating that
the results of f-score can be even higher when using different classification
thresholds. In both cases, we can see a steady increase in FPR, which allows
us to set a classification threshold to remove false positives from the
localization.

Fig 6: ROC curves calculated as micro and macro averages for the LambdaResnet
architecture. Fig 7: ROC curves calculated as micro and macro averages for the
MobileNetV3 architecture.

Two last observations regarding the dataset. First, in section Materials and
methods, we said that the students who captured the images were instructed to
keep the dataset balanced. However, this did not happen, as seen in table 2.
According to the students themselves, this happened because some fish were too
small, and some students insisted on taking a picture of such fish. In order
to do so, they took more pictures of tanks with such small fish than of
others. Therefore, the imbalance in the dataset can be understood as a
characteristic of the problem reflected in the dataset. Finally, the natural
behavior of the students also caused the dataset to have some sets of images
that are too similar to each other, which may affect the results, but is also
an aspect of the problem.

### Conclusion

This work was motivated by the possibility of improving the experience of
learning about aquatic environments by visiting the Pantanal Biopark, the
largest freshwater aquarium in the world. As reported, the task of using AI to
improve visiting experience in cultural contexts is not without precedent, and
in this work it was our intention to give an important step towards such a
goal in the context of the Biopark. More specifically, in this work we
presented a new dataset composed by images of many of the tanks present in the
Biopark. The task that comes with the dataset is to correctly identify the
tanks from which the images were taken. By applying some state-of-the-art
neural network architecture, we established some baseline results of around
88% for precision, recall and f-score. Although not bad, these results are
still not ideal to build a system with the proposed objectives. As discussed,
it is our opinion that there is room for improvement, both by testing other
architectures and optimizers, and also by testing different hyperparameters
for the same architectures and for the Adam optimizers. This question is left
open for future research.

## Acknowledgments

This work has received financial support from the Dom Bosco Catholic
University and from the Foundation for the Support and Development of
Education, Science and Technology from the State of Mato Grosso do Sul,
FUNDECT. Some of the authors have been awarded with Scholarships from the the
Brazilian National Council of Technological and Scientific Development, CNPq
and the Coordination for the Improvement of Higher Education Personnel, CAPES.
We thank Biopark Pantanal for supporting this work.

We also thank the following students for collecting the images: Álvaro
Barbosa, Amanda Yamashita, Dalian Gowert, Fernanda Cacho, Guilherme Cândido,
Guilherme Lube, João Pedro Roberto, Leonardo Victorio, and Rodrigo Stuqui.
[bib1]

## References

  * 1. Ubina NA, Cheng SC, Chen HY, Chang CC, Lan HY.  A Visual Aquaculture System Using a Cloud-Based Autonomous Drones.  DRONES. 2021;5(4).  doi:10.3390/drones5040109.
  * 2. Zhao S, Zhang S, Liu J, Wang H, Zhu J, Li D, et al.  Application of machine learning in intelligent fish aquaculture: A review.  AQUACULTURE. 2021;540.  doi:10.1016/j.aquaculture.2021.736724.
  * 3. Salman A, Siddiqui SA, Shafait F, Mian A, Shortis MR, Khurshid K, et al.  Automatic fish detection in underwater videos by a deep neural network-based hybrid motion learning system.  ICES JOURNAL OF MARINE SCIENCE. 2020;77(4):1295–1307.  doi:10.1093/icesjms/fsz025.
  * 4. Ju Z, Xue Y.  Fish species recognition using an improved AlexNet model.  Optik. 2020;223:165499.  doi:https://doi.org/10.1016/j.ijleo.2020.165499.
  * 5. Félix G, Siller M, Alvarez EN.  A fingerprinting indoor localization algorithm based deep learning.  In: 2016 eighth international conference on ubiquitous and future networks (ICUFN). IEEE; 2016. p. 1006–1011.
  * 6. Shao W, Luo H, Zhao F, Ma Y, Zhao Z, Crivello A.  Indoor positioning based on fingerprint-image and deep learning.  Ieee Access. 2018;6:74699–74712.
  * 7. Liu Q, Li R, Hu H, Gu D.  Indoor topological localization based on a novel deep learning technique.  Cognitive Computation. 2020;12:528–541.
  * 8. Bai X, Huang M, Prasad NR, Mihovska AD.  A survey of image-based indoor localization using deep learning.  In: 2019 22nd International Symposium on Wireless Personal Multimedia Communications (WPMC). IEEE; 2019. p. 1–6.
  * 9. Sergi I, Leo M, Carcagni P, La Franca M, Distante C, Patrono L.  A Microservices Architecture based on a Deep-learning Approach for an Innovative Fruition of Art and Cultural Heritage.  JOURNAL OF COMMUNICATIONS SOFTWARE AND SYSTEMS. 2022;18(2):182–192.  doi:10.24138/jcomss-2022-0001.
  * 10. Vaswani A, Shazeer N, Parmar N, Uszkoreit J, Jones L, Gomez AN, et al.  Attention is All you Need.  In: Guyon I, Luxburg UV, Bengio S, Wallach H, Fergus R, Vishwanathan S, et al., editors. Advances in Neural Information Processing Systems. vol. 30. Curran Associates, Inc.; 2017.
  * 11. Dosovitskiy A, Beyer L, Kolesnikov A, Weissenborn D, Zhai X, Unterthiner T, et al.  An image is worth 16x16 words: Transformers for image recognition at scale.  arXiv preprint arXiv:201011929. 2020;.
  * 12. He K, Zhang X, Ren S, Sun J.  Deep residual learning for image recognition.  In: Proceedings of the IEEE conference on computer vision and pattern recognition; 2016. p. 770–778.
  * 13. Wightman R. PyTorch Image Models; 2019.  https://github.com/rwightman/pytorch-image-models.
  * 14. Tu Z, Talebi H, Zhang H, Yang F, Milanfar P, Bovik A, et al.  Maxvit: Multi-axis vision transformer.  In: Computer Vision–ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23–27, 2022, Proceedings, Part XXIV. Springer; 2022. p. 459–479.
  * 15. Bello I.  Lambdanetworks: Modeling long-range interactions without attention.  arXiv preprint arXiv:210208602. 2021;.
  * 16. Vaswani A, Ramachandran P, Srinivas A, Parmar N, Hechtman B, Shlens J.  Scaling local self-attention for parameter efficient visual backbones.  In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition; 2021. p. 12894–12904.
  * 17. Srinivas A, Lin TY, Parmar N, Shlens J, Abbeel P, Vaswani A.  Bottleneck transformers for visual recognition.  In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition; 2021. p. 16519–16529.
  * 18. Tan M, Le QV.  EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks.  CoRR. 2019;abs/1905.11946.
  * 19. Howard A, Sandler M, Chu G, Chen L, Chen B, Tan M, et al.  Searching for MobileNetV3.  CoRR. 2019;abs/1905.02244.
  * 20. Huang G, Liu Z, Weinberger KQ.  Densely Connected Convolutional Networks.  CoRR. 2016;abs/1608.06993.
  * 21. Jelihovschi EG, Faria JC, Allaman IB.  ScottKnott: A Package for Performing the Scott-Knott Clustering Algorithm in R.  Trends in Applied and Computational Mathematics. 2014;15(1):3–17.


Fourier Series of Gegenbauer–Sobolev Polynomials

Fourier Series of Gegenbauer–Sobolev Polynomials††This paper is a contribution
to the Special Issue on Orthogonal Polynomials, Special Functions and
Applications (OPSFA14). The full collection is available at
https://www.emis.de/journals/SIGMA/OPSFA2017.html

Óscar CIAURRI and Judit MÍNGUEZ

Ó. Ciaurri and J. Mínguez

Departamento de Matemáticas y Computación, Universidad de La Rioja, 26006
Logroño, Spain<EMAIL_ADDRESS><EMAIL_ADDRESS>
Received January 19, 2018, in final form March 13, 2018; Published online
March 17, 2018

We study the partial sum operator for a Sobolev-type inner product related to
the classical Gegenbauer polynomials. A complete characterization of the
partial sum operator in an appropriate Sobolev space is given. Moreover, we
analyze the convergence of the partial sum operators.

Sobolev-type inner product; Sobolev polynomials; Gegenbauer polynomials;
partial sum operator

42A20; 33C47

##  1 Introduction

Let the Sobolev-type inner product be

$\displaystyle\langle f,g\rangle_{S}=\int_{-1}^{1}f(x)g(x){\rm
d}\mu_{\alpha}(x)+M(f(1)g(1)+f(-1)g(-1))$ $\displaystyle\hphantom{\langle
f,g\rangle_{S}=}{}+N(f^{\prime}(1)g^{\prime}(1)+f^{\prime}(-1)g^{\prime}(-1)),$
(1.1)

where $M\geq 0$, $N\geq 0$, and

$\displaystyle{\rm
d}\mu_{\alpha}(x)=\frac{\Gamma(2\alpha+2)}{2^{2\alpha+1}\Gamma^{2}(\alpha+1)}\big{(}1-x^{2}\big{)}^{\alpha}{\rm
d}x,\qquad\alpha>-1/2,$

is the probability measure corresponding to the Gegenbauer polynomials.

Let $\\{Q_{n}^{\alpha}(x)\\}_{n\geq 0}$ be the sequence of normalized
Gegenbauer–Sobolev orthonormal polynomials with respect to the inner product
(1.1). For each appropriate function $f$, we define its sequence of
Fourier–Gegenbauer–Sobolev coefficients by

$\displaystyle\widehat{f}(k)=\langle f,Q_{k}^{\alpha}\rangle_{S},\qquad
k=0,1,\dots,$

and the $n$-th partial sum operator as

$\displaystyle G_{n}f(x)=\sum_{k=0}^{n}\widehat{f}(k)Q_{k}^{\alpha}(x),\qquad
n=0,1,\dots.$

Given $1<p<\infty$, we say that $f\in L^{p}({\rm d}\mu_{\alpha})$ if $f$ is a
measurable function in $[-1,1]$ and

$\displaystyle\|f\|_{L^{p}({\rm
d}\mu_{\alpha})}=\left(\int_{-1}^{1}|f(x)|^{p}{\rm
d}\mu_{\alpha}(x)\right)^{1/p}<\infty.$

Let us define the measure
$\mu_{\alpha,M}:=\mu_{\alpha}+M(\delta_{1}+\delta_{-1})$. We consider the
space $W_{p}^{\alpha}$, with $1<p<\infty$, as the set of equivalence classes,
with respect to the (semi)norm in $L^{p}(\mu_{\alpha,M})$, of measurable
functions defined on $[-1,1]$ such that there exists an element in the class
$f$ for which $f^{\prime}(1)$ and $f^{\prime}(-1)$ are defined, and

$\displaystyle\|f\|_{W_{p}^{\alpha}}^{p}:=\|f\|_{L^{p}({\rm
d}\mu_{\alpha})}^{p}+M\big{(}|f(1)|^{p}+|f(-1)|^{p}\big{)}+N\big{(}|f^{\prime}(1)|^{p}+|f^{\prime}(-1)|^{p}\big{)}<\infty.$

The main target of this paper is the study of the uniform boundedness of the
operators $G_{n}$. In fact, we will prove the following characterization.

######  Theorem 1.1.

Let $\alpha>-1/2$, $1<p<\infty$, and $f\in W_{p}^{\alpha}$. There exists a
constant $C$, independent of $n$ and $f$, such that

$\displaystyle\|G_{n}f\|_{W_{p}^{\alpha}}\leq C\|f\|_{W_{p}^{\alpha}}$

if and only if

$\displaystyle\frac{4(\alpha+1)}{2\alpha+3}<p<\frac{4(\alpha+1)}{2\alpha+1}.$
(1.2)

The uniform boundedness of the partial sum operators for Gegenbauer
polynomials in $L^{p}({\rm d}\mu_{\alpha})\\!$ was given by Pollard [11] who
extended it to the Jacobi setting in [12]. A general result including weights
for Jacobi expansions can be seen in [9]. In [3], by applying the boundedness
with weights of the Hilbert transform, the authors did a complete study of the
boundedness of the partial sum operators related to generalized Jacobi
weights. The same authors studied the generalized Jacobi weights with mass
points on the interval $[-1,1]$ (see [4]). The uniform boundedness with
weights of the partial sum operator for the generalized Jacobi polynomials has
been used to proved, using an idea dating back to J. Marcinkiewicz, some
results related to interpolating polynomials (see [15, 16] and the references
in [10]).

It would be natural to consider our problem for the Jacobi weight instead of
the Gegenbauer one. This extension requires some results about the
corresponding Jacobi–Sobolev polynomials that are unavailable in the
literature at this moment. We hope to develop these tools in a forthcoming
paper to obtain a complete characterization in that case as well.

As far as we know, a complete characterization of the uniform boundedness of
the partial sums in the Sobolev setting is completely new. In [6], the authors
observed that the main obstacle to analyze this problem is the lack of
Christoffel–Darboux formula for Sobolev orthogonal polynomials. As a
consequence of this fact, except for certain particular cases, the convergence
of Fourier expansions in Sobolev orthogonal polynomials has not been resolved.
For example, the particular case of the Fourier series associated to the
Jacobi–Sobolev polynomials defined by the inner product

$\displaystyle\int_{-1}^{1}f(x)g(x)(1-x)^{\alpha}(1+x)^{\beta}{\rm
d}x+\int_{-1}^{1}f^{\prime}(x)g^{\prime}(x)(1-x)^{\alpha+1}(1+x)^{\beta+1}{\rm
d}x$

was treated in [5] but, unfortunately, the given results are not completely
satisfactory.

Our proof of Theorem 1.1 relies on some results about multipliers and
transplantation operators for Jacobi expansions proved by Muckenhoupt and
other authors in the eighties of the last century (see [8] and the references
therein).

From a standard argument, the uniform boundedness of the operator $G_{n}$ will
imply the convergence for functions in the class $W_{p}^{\alpha}$ if the
polynomials form a dense class. However, the reverse implication is not true
because the space $W_{p}^{\alpha}$ is not complete. The density of the
polynomials is contained in the next result.

######  Theorem 1.2.

The set of polynomials is dense in the space $W_{p}^{\alpha}$. That is, given
$f\in W_{p}^{\alpha}$, for all $\varepsilon>0$ there exists a polynomial
$q_{n}$ of degree $n$ such that

$\displaystyle\|f-q_{n}\|_{W_{p}^{\alpha}}<\varepsilon.$

Now, from Theorems 1.1 and 1.2, we deduce the convergence for functions in the
class $W_{p}^{\alpha}$ of the partial sums $G_{n}$.

######  Corollary 1.3.

Let $f\in W_{p}^{\alpha}$ with $\alpha>-1/2$ and $1<p<\infty$. If

$\frac{4(\alpha+1)}{2\alpha+3}<p<\frac{4(\alpha+1)}{2\alpha+1},$

then

$\displaystyle\lim_{n\to\infty}\|G_{n}f-f\|_{W_{p}^{\alpha}}=0.$

In Section 2 we present the necessary definitions and results concerning to
the Gegenbauer and Gegenbauer–Sobolev polynomials. Section 3 and Section 4 are
devoted to prove Theorem 1.1 and Theorem 1.2, respectively.

##  2 Definitions and auxiliary results

Let $\\{R_{n}^{\alpha}\\}_{n\geq 0}$ be the sequence of Gegenbauer polynomials
given by the Rodrigues formula

$\displaystyle
R_{n}^{\alpha}(x)=\frac{(-1)^{n}}{\Gamma(\alpha+1)}{2^{n}\Gamma(n+\alpha+1)}\big{(}1-x^{2}\big{)}^{-\alpha}\frac{{\rm
d}^{n}}{{\rm d}x^{n}}\big{(}\big{(}1-x^{2}\big{)}^{n+\alpha}\big{)}.$

If we call $\\{B_{n}^{\alpha}\\}_{n_{\geq}0}$ the sequence of orthogonal
polynomials with respect to (1.1), the following relation between
$R_{n}^{\alpha}$ and $B_{n}^{\alpha}$ was proved in [1]

$\displaystyle
B_{n}^{\alpha}(x)=\frac{a_{n}(n+2\alpha+1)_{4}(-n)_{4}}{2^{6}(\alpha+2)(\alpha+3)(\alpha+1)_{4}}\big{(}1-x^{2}\big{)}^{2}R_{n-4}^{\alpha+4}(x)$
$\displaystyle\hphantom{B_{n}^{\alpha}(x)=}{}+\frac{b_{n}(n+2\alpha+1)_{2}(-n)_{2}}{2^{2}(\alpha+1)_{2}}\big{(}1-x^{2}\big{)}R_{n-2}^{\alpha+2}(x)+c_{n}R_{n}^{\alpha}(x),$
(2.1)

where $(a)_{n}$ is the shifted factorial (or Pochhammer symbol), defined by
$(a)_{n}=\frac{\Gamma(a+n)}{\Gamma(a)}$, and

$\displaystyle
a_{n}=MN\frac{4(2\alpha+3)_{n}(2\alpha+3)_{n-2}}{(\alpha+1)(\alpha+2)n!(n-2)!}+N\frac{2(2\alpha+3)_{n-1}}{(\alpha+1)(n-1)!},$
$\displaystyle
b_{n}=-\frac{N}{2}\frac{(2\alpha+3)_{n-1}(n-2)(n+2\alpha+3)}{(\alpha+1)(\alpha+3)(n-1)!}-2M\frac{(2\alpha+3)_{n-2}}{n!},$
$\displaystyle
c_{n}=1-\frac{N}{2}\frac{(2\alpha+3)_{n+1}}{(\alpha+1)(\alpha+2)(\alpha+3)(n-3)!}.$

Here and elsewhere we use the convention that $R_{n}^{\gamma}\equiv 0$ if
$n<0$.

In [7] it was proved the identity

$\displaystyle\|B_{n}^{\alpha}\|_{W_{2}^{\alpha}}^{2}=2Mc_{n}^{2}+2N\left(\frac{n(n+2\alpha+1)}{2(\alpha+1)}+\frac{M(2\alpha+3)_{n}}{(\alpha+1)(\alpha+2)(n-1)!}\right)^{2}$
$\displaystyle\hphantom{\|B_{n}^{\alpha}\|_{W_{2}^{\alpha}}^{2}=}{}+\frac{\Gamma(2\alpha+2)n!}{(2n+2\alpha+1)\Gamma(n+2\alpha+1)}\left(\frac{n(n-1)(n-2)(n-3)(n+2\alpha+1)_{4}a_{n}^{2}}{16(\alpha+2)^{2}(\alpha+3)^{2}}\right.$
$\displaystyle\hphantom{\|B_{n}^{\alpha}\|_{W_{2}^{\alpha}}^{2}=}{}\times
n(n-1)(n+2\alpha+1)_{2}b_{n}^{2}-\frac{n(n-1)(n-2)(n-3)(n+2\alpha+1)_{2}a_{n}b_{n}}{2(\alpha+2)_{2}}$
$\displaystyle\left.\hphantom{\|B_{n}^{\alpha}\|_{W_{2}^{\alpha}}^{2}=}{}+c_{n}^{2}-2n(n-1)b_{n}c_{n}+\frac{n(n-1)(n-2)(n-3)a_{n}c_{n}}{2(\alpha+2)(\alpha+3)}\right).$

Then $Q_{n}^{\alpha}(x)=\lambda_{n,\alpha}B_{n}^{\alpha}(x)$, where
$\lambda_{n,\alpha}^{-2}=\|B_{n}^{\alpha}\|_{W_{2}^{\alpha}}^{2}$. Now,
denoting by $\\{P_{n}^{\alpha}\\}_{n\geq 0}$ the sequence of orthonormal
Gegenbauer polynomials, given by
$P_{n}^{\alpha}=\beta_{n,\alpha}R_{n}^{\alpha}$ with

$\displaystyle\beta_{n,\alpha}^{-2}=\|R_{n}^{\alpha}\|_{L^{2}({\rm
d}\mu_{\alpha})}^{2}=\frac{\Gamma(2\alpha+2)n!}{(2n+2\alpha+1)\Gamma(n+2\alpha+1)},$

from (2.1) we can write

$\displaystyle
Q_{n}^{\alpha}(x)=A_{n,4}\big{(}1-x^{2}\big{)}^{2}P_{n-4}^{\alpha+4}(x)+A_{n,2}\big{(}1-x^{2}\big{)}P_{n-2}^{\alpha+2}(x)+A_{n,0}P_{n}^{\alpha}(x),$
(2.2)

where

$\displaystyle
A_{n,4}=\frac{a_{n}(n+2\alpha+1)_{4}(-n)_{4}}{2^{6}(\alpha+2)(\alpha+3)(\alpha+1)_{4}}\frac{\lambda_{n,\alpha}}{\beta_{n-4,\alpha+4}},\qquad
A_{n,2}=\frac{b_{n}(n+2\alpha+1)_{2}(-n)_{2}}{2^{2}(\alpha+1)_{2}}\frac{\lambda_{n,\alpha}}{\beta_{n-2,\alpha+2}},$

and $A_{n,0}=c_{n}\frac{\lambda_{n,\alpha}}{\beta_{n,\alpha}}$.

We consider the notations

$\displaystyle
g(n,J)=\sum_{j=0}^{J-1}\frac{d_{j}}{(n+1)^{j}}+O\left(\frac{1}{(n+1)^{J}}\right),\qquad
J\in\mathbb{N},$ $\displaystyle h(n,\alpha)=\sum_{j=0}^{\lfloor
2\alpha+2\rfloor}\frac{D_{j}}{(n+1)^{j}}+O\left(\frac{1}{(n+1)^{2\alpha+2}}\right),\qquad\alpha>-1/2,$

for some constants $d_{j}$ and $D_{j}$ that will be different in each
occurrence of the $g(n,J)$ and $h(n,\alpha)$, respectively. With the previous
notation, by using that

$\displaystyle\frac{\Gamma(n+a)}{\Gamma(n+b)}=n^{a-b}g(n,J),$ (2.3)

for any $J\in\mathbb{N}$, we deduce in an easy way that

$\displaystyle\lambda_{n,\alpha}=\begin{cases}(n+1)^{-\alpha-\frac{11}{2}}g(n,J),&M=0,\
N>0,\\\ (n+1)^{-3\alpha-\frac{15}{2}}h(n,\alpha),&M>0,\ N>0,\\\
(n+1)^{-\alpha-\frac{3}{2}}h(n,\alpha),&M>0,\ N=0,\end{cases}$ (2.4)

for any $J\in\mathbb{N}$.

######  Lemma 2.1.

Let $\alpha>-1/2$. Then the constants $A_{n,4}$, $A_{n,2}$, and $A_{n,0}$ in
(2.2) satisfy the following:

  * $i)$

If $M=0$ and $N>0$,

$\displaystyle A_{n,4}=g(n,J),\qquad A_{n,2}=g(n,J),\qquad A_{n,0}=g(n,J),$

for any $J\in\mathbb{N}$.

  * $ii)$

If $M>0$ and $N>0$,

$\displaystyle A_{n,4}=h(n,\alpha),\qquad
A_{n,2}=\frac{h(n,\alpha)}{(n+1)^{2\alpha+2}},\qquad
A_{n,0}=\frac{h(n,\alpha)}{(n+1)^{2\alpha+2}}.$

  * $iii)$

If $M>0$ and $N=0$,

$\displaystyle A_{n,4}=0,\qquad A_{n,2}=h(n,\alpha),\qquad
A_{n,0}=\frac{h(n,\alpha)}{(n+1)^{2\alpha+2}}.$

###### Proof.

From (2.3) we have

$\displaystyle a_{n}=\begin{cases}(n+1)^{2\alpha+2}g(n,J),&M=0,\ N>0,\\\
(n+1)^{4\alpha+4}h(n,\alpha),&M>0,\ N>0,\\\ 0,&M>0,\ N=0,\end{cases}$
$\displaystyle b_{n}=\begin{cases}(n+1)^{2\alpha+4}g(n,J),&M=0,\ N>0,\\\
(n+1)^{2\alpha+4}g(n,J),&M>0,\ N>0,\\\ (n+1)^{2\alpha}g(n,J),&M>0,\
N=0,\end{cases}$ $\displaystyle
c_{n}=\begin{cases}(n+1)^{2\alpha+6}g(n,J),&M=0,\ N>0,\\\
(n+1)^{2\alpha+6}g(n,J),&M>0,\ N>0,\\\ 1,&M>0,\ N=0,\end{cases}$

and $\beta_{n,\alpha}=(n+1)^{\alpha+1/2}g(n,J)$, for any $j\in\mathbb{N}$.
Then, using that (2.4), the result follows. ∎

The following results, that we will use in the proof of Theorem 1.1, can be
found in [7]. The notation appearing in Lemma 2.3, $f(n)\approx g(n)$,
indicates the existence of positive constants $C$ and $D$ such that $Cf(n)\leq
g(n)\leq Df(n)$ for $n$ large enough.

######  Lemma 2.2.

Let $\\{Q_{n}^{\alpha}\\}_{n}$ be the sequence of orthonormal polynomials with
respect to the inner product (1.1), then

$\displaystyle\max_{-1\leq x\leq
1}\big{(}1-x^{2}\big{)}^{\frac{\alpha}{2}+\frac{1}{4}}|Q_{n}^{\alpha}(x)|\leq
C.$

######  Lemma 2.3.

Let $\\{Q_{n}^{\alpha}\\}_{n}$ be the sequence of orthonormal polynomials with
respect to the inner product (1.1), then

$\displaystyle|Q_{n}^{\alpha}(1)|=|Q_{n}^{\alpha}(-1)|\approx\begin{cases}(n+1)^{-\alpha-3/2},&M>0,\
N\geq 0,\\\ (n+1)^{\alpha+1/2},&M=0,\ N>0,\end{cases}$
$\displaystyle|(Q_{n}^{\alpha})^{\prime}(1)|=|(Q_{n}^{\alpha})^{\prime}(-1)|\approx\begin{cases}(n+1)^{-\alpha-7/2},&M\geq
0,\ N>0,\\\ (n+1)^{\alpha+5/2},&M>0,\ N=0.\end{cases}$

Let $S_{n}^{\gamma}f$ be the $n$-th partial sum of Fourier expansion in terms
of orthonormal Gegenbauer polynomials,

$\displaystyle
S_{n}^{\gamma}f(x)=\sum_{k=0}^{n}d_{k}^{\gamma}(f)P_{k}^{\gamma}(x),\qquad
d_{k}^{\gamma}(f)=\int_{-1}^{1}f(x)P_{k}^{\gamma}(x){\rm d}\mu_{\gamma}(x).$

From the main result in [8] we can deduce the following result

######  Lemma 2.4.

Let $\gamma>-1$ and $1<p<\infty$. There exists a constant $C$, independent of
$n$ and $f$, such that

$\displaystyle\big{\|}\big{(}1-(\cdot)^{2}\big{)}^{a}S^{\gamma}_{n}f\big{\|}_{L^{p}({\rm
d}\mu_{\gamma})}\leq
C\big{\|}\big{(}1-(\cdot)^{2}\big{)}^{a}f\big{\|}_{L^{p}({\rm
d}\mu_{\gamma})}$

if and only if

$\displaystyle\left|a+(\gamma+1)\bigg{(}\frac{1}{p}-\frac{1}{2}\bigg{)}\right|<\frac{1}{4}.$

Let $d$ be an integer number. We define the transplantation operator

$\displaystyle
T_{d}^{\beta,\gamma}f(x)=\sum_{k=0}^{\infty}d_{k}^{\gamma}(f)P_{k+d}^{\beta}(x).$

The operator $T_{d}^{\beta,\gamma}$ is well defined, for example, for
functions $f$ having a finite expansion in terms of the Gegenbauer polynomials
$P_{n}^{\gamma}$. The following result plays a crucial role in our work. It is
essentially a special case of a general weighted transplantation theorem due
to Muckenhoupt, see [9, Theorem 1.6].

######  Lemma 2.5.

Let $\gamma>-1$, $\beta>-1$, and $1<p<\infty$. If $2(b+1)>-p(\beta+1/2)$ then

$\displaystyle\left(\int_{-1}^{1}|T_{d}^{\beta,\gamma}f(x)|^{p}\big{(}1-x^{2}\big{)}^{\frac{p}{2}(\beta+1/2)+b}{\rm
d}x\right)^{1/p}\leq
C\left(\int_{-1}^{1}|f(x)|^{p}\big{(}1-x^{2}\big{)}^{\frac{p}{2}(\gamma+1/2)+b}{\rm
d}x\right)^{1/p}.$

The last tool that we will need for the proof of Theorem 1.1 is related to the
boundedness of a specific multiplier for Gegenbauer expansions. We define the
operator

$\displaystyle
R^{\gamma}f(x)=\sum_{k=0}^{\infty}\frac{d_{k}^{\gamma}(f)}{k+1}P_{k}^{\gamma}(x).$

######  Lemma 2.6.

Let $\gamma>-1$ and $1<p<\infty$. If $|2b+1|<p$ and

$\displaystyle\left|\frac{2(b+1)}{p}-\frac{1}{2}\right|<\min\\{\gamma+1,1/2\\},$

then

$\displaystyle\left(\int_{-1}^{1}|R^{\gamma}f(x)|^{p}\big{(}1-x^{2}\big{)}^{\frac{p}{2}(\gamma+1/2)+b}{\rm
d}x\right)^{1/p}\leq
C\left(\int_{-1}^{1}|f(x)|^{p}\big{(}1-x^{2}\big{)}^{\frac{p}{2}(\gamma+1/2)+b}{\rm
d}x\right)^{1/p}.$

This lemma is a particular case of [9, Theorem 1.10] because the multiplier
$1/(k+1)$ belongs to the class $M(1,1)$ there defined.

##  3 Proof of Theorem 1.1

Taking the kernel

$\displaystyle L_{n}(x,y)=\sum_{k=0}^{n}Q_{k}^{\alpha}(x)Q_{k}^{\alpha}(y),$

it is easy to see that

$\displaystyle G_{n}f(x)=\langle L_{n}(x,y),f\rangle_{S}.$

Recall that

$\displaystyle\|G_{n}f\|_{W_{p}^{\alpha}}^{p}=\|G_{n}f\|_{L^{p}({\rm
d}\mu_{\alpha})}^{p}+M\big{(}|G_{n}f(1)|^{p}+|G_{n}f(-1)|^{p}\big{)}$
$\displaystyle\hphantom{\|G_{n}f\|_{W_{p}^{\alpha}}^{p}=}{}+N\big{(}|(G_{n}f)^{\prime}(1)|^{p}+(G_{n}f)^{\prime}(-1)|^{p}\big{)}.$

The necessity of the condition (1.2) is a consequence of [2, Theorem 1] and
its sufficiency will be obtained from two following propositions.

######  Proposition 3.1.

Let $\alpha>-1/2$ and $1<p<\infty$. If (1.2) holds, then

$\displaystyle\|G_{n}f(x)\|_{L^{p}({\rm d}\mu_{\alpha})}\leq
C\|f\|_{{W_{p}^{\alpha}}},$ (3.1)

where $C$ is a constant independent of $n$ and $f$.

######  Proposition 3.2.

Let $\alpha>-1/2$ and $1<p<\infty$. If (1.2) holds, then

$M\big{(}|G_{n}f(1)|^{p}+|G_{n}f(-1)|^{p}\big{)}+N\big{(}|(G_{n}f)^{\prime}(1)|^{p}+|(G_{n}f)^{\prime}(-1)|^{p}\big{)}\leq
C\|f\|_{W_{p}^{\alpha}},$

where $C$ is a constant independent of $n$ and $f$.

###### Proof of Proposition 3.1.

From Minkowski’s inequality, we know that

$\displaystyle\|G_{n}f(x)\|_{L^{p}({\rm
d}\mu_{\alpha})}\leq\left(\int_{-1}^{1}\left|\int_{-1}^{1}f(y)L_{n}(x,y){\rm
d}{\mu_{\alpha}}(y)\right|^{p}{\rm d}\mu_{\alpha}(x)\right)^{1/p}$
$\displaystyle\hphantom{\|G_{n}f(x)\|_{L^{p}({\rm
d}\mu_{\alpha})}\leq}{}+\left(\int_{-1}^{1}|M(f(1)L_{n}(x,1)+f(-1)L_{n}(x,-1)|^{p}{\rm
d}\mu_{\alpha}(x)\right)^{1/p}$
$\displaystyle\hphantom{\|G_{n}f(x)\|_{L^{p}({\rm
d}\mu_{\alpha})}\leq}{}+\left(\int_{-1}^{1}\left|N(f^{\prime}(1)\frac{\partial
L_{n}}{\partial y}(x,1)+f^{\prime}(-1)\frac{\partial L_{n}}{\partial
y}(x,-1))\right|^{p}{\rm d}\mu_{\alpha}(x)\right)^{1/p}.$

First, it will be proved that

$\displaystyle\left(\int_{-1}^{1}\left|\int_{-1}^{1}f(x)L_{n}(x,y){\rm
d}\mu_{\alpha}(y)\right|^{p}{\rm d}\mu_{\alpha}(x)\right)^{1/p}\leq
C\|f\|_{L^{p}({\rm d}\mu_{\alpha})}.$ (3.2)

Using (2.2), we have

$\displaystyle\int_{-1}^{1}f(y)L_{n}(x,y){\rm
d}\mu_{\alpha}(y)=\sum_{j,m\in\\{4,2,0\\}}M_{n}^{j,m}f(x),$

where

$\displaystyle M_{n}^{j,m}f(x)=\int_{-1}^{1}f(y)K_{n}^{j,m}(x,y){\rm
d}\mu_{\alpha}(y),$ $\displaystyle
K_{n}^{j,m}(x,y)=\big{(}1-x^{2}\big{)}^{j/2}\big{(}1-y^{2}\big{)}^{m/2}\sum_{k=0}^{n}A_{k,j}A_{k,m}P_{k-j}^{\alpha+j}(x)P_{k-m}^{\alpha+m}(y).$

By using a standard duality argument, to deduce (3.2) it is enough to prove

$\displaystyle\|M_{n}^{j,m}f\|_{L^{p}({\rm d}\mu_{\alpha})}\leq
C\|f\|_{L^{p}({\rm d}\mu_{\alpha})}$

for $m\leq j$.

By Lemma 2.1, each operator $M_{n}^{j,m}$ can be decomposed as

$\displaystyle
M_{n}^{j,m}f(x)=S_{0}M_{n}^{j,m,0}f(x)+S_{1}M_{n}^{j,m,1}f(x)+S_{2}M_{n}^{j,m,2}f(x),$

for some nonnegative constants $S_{0}$, $S_{1}$ and $S_{2}$, with

$\displaystyle\begin{split}&M_{n}^{j,m,s}f(x)=\int_{-1}^{1}f(y)K_{n}^{j,m,s}(x,y){\rm
d}\mu_{\alpha}(y),\qquad s=0,1,2,\\\
&K_{n}^{j,m,s}(x,y)=\big{(}1-x^{2}\big{)}^{j/2}\big{(}1-y^{2}\big{)}^{m/2}\sum_{k=0}^{n}(k+1)^{-s}P_{k-j}^{\alpha+j}(x)P_{k-m}^{\alpha+m}(y),\qquad
s=0,1,\end{split}$

and

$\displaystyle\big{|}K_{n}^{j,m,2}(x,y)\big{|}\leq
C\big{(}1-x^{2}\big{)}^{j/2}\big{(}1-y^{2}\big{)}^{m/2}\sum_{k=0}^{n}k^{-\theta}\big{|}P_{k-j}^{\alpha+j}(x)\big{|}\big{|}P_{k-m}^{\alpha+m}(y)\big{|},$

where $\theta>1$.

From the well-known estimate (it follows from [14, Theorem 7.32.2, p. 169])

$\displaystyle|P_{n}^{\alpha}(x)|\leq
C\big{(}1-x^{2}\big{)}^{-(\alpha/2+1/4)},\qquad x\in[-1,1],$

with $C$ a constant independent of $n$, we deduce

$\displaystyle\big{\|}\big{(}1-(\cdot)^{2}\big{)}^{j/2}P_{n-j}^{\alpha+j}\big{\|}_{L^{p}({\rm
d}\mu_{\alpha})}\leq C$

for $p<4(\alpha+1)/(2\alpha+1)$. In this way, applying Hölder inequality,

$\displaystyle\big{\|}M_{n}^{j,m,2}f\big{\|}_{L^{p}({\rm d}\mu_{\alpha})}\leq
C\|f\|_{L^{p}({\rm d}\mu_{\alpha})},$

for each $p$ verifying (1.2).

It is easy to check that

$\displaystyle
M_{n}^{j,j,0}f(x)=K_{\alpha}\big{(}1-x^{2}\big{)}^{j/2}S_{n-j}^{\alpha+j}g(x),$

for a constant $K_{\alpha}$, with $j=4,2,0$ and
$g(x)=\big{(}1-x^{2}\big{)}^{-j/2}f(x)$. Then, if $p$ satisfies (1.2), from
Lemma 2.4, with $a=j(1/2-1/p)$ and $\gamma=\alpha+j$, we deduce

$\displaystyle\big{\|}M_{n}^{j,j,0}f\big{\|}_{L^{p}({\rm
d}\mu_{\alpha})}=K_{\alpha}\big{\|}\big{(}1-(\cdot)^{2}\big{)}^{j(1/2-1/p)}S_{n-j}^{\alpha+j}g\big{\|}_{L^{p}({\rm
d}\mu_{\alpha+j})}$
$\displaystyle\hphantom{\big{\|}M_{n}^{j,j,0}f\big{\|}_{L^{p}({\rm
d}\mu_{\alpha})}}{}\leq
C\big{\|}\big{(}1-(\cdot)^{2}\big{)}^{j(1/2-1/p)}g\big{\|}_{L^{p}({\rm
d}\mu_{\alpha+j})}\leq C\|f\|_{L^{p}({\rm d}\mu_{\alpha})}.$

Now, for $m<j$, we can check that

$\displaystyle
M_{n}^{j,m,0}f(x)=C_{\alpha}\big{(}1-x^{2}\big{)}^{j/2}T_{m-j}^{\alpha+j,\alpha+m}\big{(}S_{n-m}^{\alpha+m}h\big{)}(x),$

for a constant $C_{\alpha}$, whith $h(x)=\big{(}1-x^{2}\big{)}^{-m/2}f(x)$.
So, using Lemma 2.5 with $\beta=\alpha+j$, $\gamma=\alpha+m$, and
$b=\alpha-p(\alpha+1/2)/2$, we have

$\displaystyle\big{\|}M_{n}^{j,m,0}f\big{\|}_{L^{p}({\rm
d}\mu_{\alpha})}=C_{\alpha}\big{\|}\big{(}1-(\cdot)^{2}\big{)}^{j/2}T_{m-j}^{\alpha+j,\alpha+m}\big{(}S_{n-m}^{\alpha+m}h\big{)}\big{\|}_{L^{p}({\rm
d}\mu_{\alpha})}$
$\displaystyle\hphantom{\big{\|}M_{n}^{j,m,0}f\big{\|}_{L^{p}({\rm
d}\mu_{\alpha})}}{}\leq
C\big{\|}\big{(}1-(\cdot)^{2}\big{)}^{m/2}S_{n-m}^{\alpha+m}h\big{\|}_{L^{p}({\rm
d}\mu_{\alpha})}\leq C\|f\|_{L^{p}({\rm d}\mu_{\alpha})},$

where in the last step we have used Lemma 2.4 as we have done for
$M_{n}^{j,j,0}$.

To analyze the operators $M_{n}^{j,m,1}$ we observe the identities

$\displaystyle
M_{n}^{j,j,1}f(x)=K_{\alpha}\big{(}1-x^{2}\big{)}^{j/2}R^{\alpha+j}\big{(}S_{n-j}^{\alpha+j}g\big{)}(x),\qquad
j=4,2,0,$ $\displaystyle
M_{n}^{j,m,1}f(x)=C_{\alpha}\big{(}1-x^{2}\big{)}^{j/2}T_{m-j}^{\alpha+j,\alpha+m}\big{(}R^{\alpha+m}\big{(}S_{n-m}^{\alpha+m}h\big{)}\big{)}(x),\qquad
m<j,$

with $g(x)=\big{(}1-x^{2}\big{)}^{-j/2}f(x)$ and
$h(x)=\big{(}1-x^{2}\big{)}^{-m/2}f(x)$. Then the boundedness of these
operators follows as in the previous cases but using moreover the estimate

$\displaystyle\big{\|}\big{(}1-(\cdot)^{2}\big{)}^{j/2}R^{\alpha+j}f\big{\|}_{L^{p}({\rm
d}\mu_{\alpha})}\leq
C\big{\|}\big{(}1-(\cdot)^{2}\big{)}^{j/2}f\big{\|}_{L^{p}({\rm
d}\mu_{\alpha})},$

which can be deduced from Lemma 2.6 taking $b=\alpha-p(\alpha+1/2)/2$ and
$\gamma=\alpha+j$ under the assumption (1.2). In this way the proof of (3.2)
is completed.

To finish the proof of (3.1), we are going to prove the estimates

$\displaystyle\int_{-1}^{1}|M(f(1)L_{n}(x,1)+f(-1)L_{n}(x,-1)|^{p}\big{(}1-x^{2}\big{)}^{\alpha}{\rm
d}x\leq CM^{p}\big{(}|f(1)|^{p}+|f(-1)|^{p}\big{)},$ (3.3)
$\displaystyle\int_{-1}^{1}\left|N\left(f^{\prime}(1)\frac{\partial
L_{n}}{\partial y}(x,1)+f^{\prime}(-1)\frac{\partial L_{n}}{\partial
y}(x,-1)\right)\right|^{p}\big{(}1-x^{2}\big{)}^{\alpha}{\rm d}x$
$\displaystyle\qquad{}\leq
CN^{p}\big{(}|f^{\prime}(1)|^{p}+|f^{\prime}(-1)|^{p}\big{)}.$ (3.4)

For (3.3) we suppose $M>0$, because in other case this element does not appear
in the norm. From Lemmas 2.2 and 2.3, for $x\in[-1,1]$, we have

$\displaystyle|L_{n}(x,1)|\leq
C\big{(}1-x^{2}\big{)}^{-\frac{\alpha}{2}-\frac{1}{4}},\qquad|L_{n}(x,-1)|\leq
C\big{(}1-x^{2}\big{)}^{-\frac{\alpha}{2}-\frac{1}{4}}.$

Then (3.3) is deduced immediately because the integral

$\displaystyle\int_{-1}^{1}\big{(}1-x^{2}\big{)}^{-\frac{p}{2}(\alpha+1/2)+\alpha}{\rm
d}x$ (3.5)

is finite for $p<4(\alpha+1)/(2\alpha+1)$.

To prove (3.4) we suppose $N>0$, because if $N=0$ the inequality is trivially
true. Again, by Lemmas 2.2 and 2.3, for $x\in[-1,1]$, we obtain the bounds

$\displaystyle\left|\frac{\partial L_{n}}{\partial y}(x,1)\right|\leq
C\big{(}1-x^{2}\big{)}^{-\frac{\alpha}{2}-\frac{1}{4}},\qquad\left|\frac{\partial
L_{n}}{\partial y}(x,-1)\right|\leq
C\big{(}1-x^{2}\big{)}^{-\frac{\alpha}{2}-\frac{1}{4}}.$

Then, as in the previous case, (3.4) is a consequence of the finiteness of the
integral (3.5). ∎

###### Proof of Proposition 3.2.

We are going to show the estimates

$\displaystyle|G_{n}f(1)|\leq C\|f\|_{W_{p}^{\alpha}},\qquad\text{for}\quad
M>0,$ (3.6)

and

$\displaystyle|(G_{n}f)^{\prime}(1)|\leq
C\|f\|_{W_{p}^{\alpha}},\qquad\text{for}\quad N>0.$ (3.7)

The analysis of $|G_{n}f(-1)|$, for $M>0$, and $|(G_{n}f)^{\prime}(-1)|$, for
$N>0$, are completely similar and the details will be omitted.

It is clear that

$\displaystyle G_{n}f(1)=\int_{-1}^{1}f(y)L_{n}(1,y){\rm
d}\mu_{\alpha}(y)+M(f(1)L_{n}(1,1)+f(-1)L_{n}(1,-1))$
$\displaystyle\hphantom{G_{n}f(1)=}{}+N\left(f^{\prime}(1)\frac{\partial
L_{n}}{\partial y}(1,1)+f^{\prime}(-1)\frac{\partial L_{n}}{\partial
y}(1,-1)\right).$

If $M>0$, from Lemmas 2.2 and 2.3 it is obtained that

$\displaystyle|L_{n}(1,y)|\leq
C\big{(}1-y^{2}\big{)}^{-\frac{\alpha}{2}-\frac{1}{4}},\qquad y\in[-1,1].$

Then, applying Hölder inequality, we have

$\displaystyle\left|\int_{-1}^{1}f(y)L_{n}(1,y){\rm
d}\mu_{\alpha}(y)\right|\leq C\|f\|_{L^{p}({\rm
d}\mu_{\alpha})}\left(\int_{-1}^{1}\big{(}1-y^{2}\big{)}^{-\frac{q}{2}(\alpha+1/2)+\alpha}{\rm
d}y\right)^{p/q}\leq C\|f\|_{L^{p}({\rm d}\mu_{\alpha})}$

because the last integral converges if $q<4(\alpha+1)/(2\alpha+1)$, which is
equivalent to $p>4(\alpha+1)/(2\alpha+3)$. On the other hand, using again
Lemma 2.3 we deduce the bounds

$\displaystyle|L_{n}(1,1)|\leq C,\qquad|L_{n}(1,-1)|\leq
C,\qquad\text{for}\quad N\geq 0$

and

$\displaystyle\left|\frac{\partial L_{n}}{\partial y}(1,1)\right|\leq
C,\qquad\left|\frac{\partial L_{n}}{\partial y}(1,-1)\right|\leq
C,\qquad\text{for}\quad N>0,$

which imply, analyzing separately the cases $N>0$ and $N=0$,

$\displaystyle\left|M(f(1)L_{n}(1,1)+f(-1)L_{n}(1,-1))+N\left(f^{\prime}(1)\frac{\partial
L_{n}}{\partial y}(1,1)+f^{\prime}(-1)\frac{\partial L_{n}}{\partial
y}(1,-1)\right)\right|$ $\displaystyle\qquad{}\leq
C\big{(}M(|f(1)|+|f(-1)|)+N(|f^{\prime}(1)|+|f^{\prime}(-1)|)\big{)},$

and (3.6) is proved.

From the identity

$\displaystyle(G_{n}f)^{\prime}(1)=\int_{-1}^{1}f(y)\frac{\partial
L_{n}}{\partial x}(1,y){\rm d}\mu_{\alpha}(y)+M\left(f(1)\frac{\partial
L_{n}}{\partial x}(1,1)+f(-1)\frac{\partial L_{n}}{\partial x}(1,-1)\right)$
$\displaystyle\hphantom{(G_{n}f)^{\prime}(1)=}{}+N\left(f^{\prime}(1)\frac{\partial^{2}L_{n}}{\partial
x\partial y}(1,1)+f^{\prime}(-1)\frac{\partial^{2}L_{n}}{\partial x\partial
y}(1,-1)\right),$

and the estimates for $N>0$, deduced from Lemmas 2.2 and 2.3,

$\displaystyle\left|\frac{\partial L_{n}}{\partial x}(1,y)\right|\leq
C\big{(}1-y^{2}\big{)}^{-\frac{\alpha}{2}-\frac{1}{4}},\qquad y\in[-1,1],$
$\displaystyle\left|\frac{\partial L_{n}}{\partial x}(1,1)\right|\leq
C,\qquad\left|\frac{\partial L_{n}}{\partial x}(1,-1)\right|\leq C,$

and

$\displaystyle\left|\frac{\partial^{2}L_{n}}{\partial x\partial
y}(1,1)\right|\leq C,\qquad\left|\frac{\partial^{2}L_{n}}{\partial x\partial
y}(1,-1)\right|\leq C,$

the proof of (3.7) is obtained in the same way as (3.6). ∎

##  4 Proof of Theorem 1.2

###### Proof.

Let $f\in W_{p}^{\alpha}$ and $\varepsilon>0$. From [13, Theorem 4.1], we have
that the space $C_{c}^{\infty}([-1,1])$ is dense in $L^{p}({\rm
d}\mu_{\alpha})$. Then, there exists a function $g\in C_{c}^{\infty}([-1,1])$
such that

$\displaystyle\|f-g\|_{L_{p}({\rm
d}\mu_{\alpha})}<\frac{\tilde{\varepsilon}}{4},$

with $\tilde{\varepsilon}=\varepsilon/(1+M+N)$. We take now a function $h\in
C_{c}^{\infty}([-1,1])$ that satisfies

$\displaystyle\|h\|_{L_{p}({\rm
d}\mu_{\alpha})}<\frac{\tilde{\varepsilon}}{4},$

and

$\displaystyle h(1)=f(1)-g(1),\qquad h(-1)=f(-1)-g(-1),$ $\displaystyle
h^{\prime}(1)=f^{\prime}(1)-g^{\prime}(1),\qquad
h^{\prime}(-1)=f^{\prime}(-1)-g^{\prime}(-1).$

Then

$\displaystyle\|f-(g+h)\|^{p}_{W_{p}^{\alpha}}=\|f-(g+h)\|^{p}_{L^{p}({\rm
d}\mu_{\alpha})}$
$\displaystyle\hphantom{\|f-(g+h)\|^{p}_{W_{p}^{\alpha}}=}{}+M\big{(}|f(1)-(g+h)(1)|^{p}+|f(-1)-(g+h)(-1)|^{p}\big{)}$
$\displaystyle\hphantom{\|f-(g+h)\|^{p}_{W_{p}^{\alpha}}=}{}+N\big{(}|f^{\prime}(1)-(g+h)^{\prime}(1)|^{p}+|f^{\prime}(-1)-(g+h)^{\prime}(-1)|^{p}\big{)}$

and

$\displaystyle\|f-(g+h)\|_{W_{p}^{\alpha}}\leq\|f-g\|_{L^{p}({\rm
d}\mu_{\alpha})}+\|h\|_{L^{p}({\rm
d}\mu_{\alpha})}<\frac{\tilde{\varepsilon}}{2}.$

On the other hand, given $\tilde{\varepsilon}$ there exists a polynomial
$q_{n}$ of degree $n$ such that

$\displaystyle\|g+h-q_{n}\|_{\infty}<\frac{\tilde{\varepsilon}}{2},\qquad\|(g+h)^{\prime}-q_{n}^{\prime}\|_{\infty}<\frac{\tilde{\varepsilon}}{2}.$

Then, $\|f-q_{n}\|_{W_{p}}^{p}<\varepsilon$ and the proof is completed. ∎

### Acknowledgements

The authors are highly indebted to professor J.M. Rodríguez for his helpful
comments about the proof of Theorem 1.2. The authors were supported by grant
MTM2015-65888-C04-4-P from Spanish Government.

## References

  * [1] Bavinck H., Meijer H.G., Orthogonal polynomials with respect to a symmetric inner product involving derivatives, Appl. Anal. 33 (1989), 103–117.
  * [2] Fejzullahu B.X., Marcellán F., A Cohen type inequality for Gegenbauer–Sobolev expansions, Rocky Mountain J. Math. 43 (2013), 135–148.
  * [3] Guadalupe J.J., Pérez M., Ruiz F.J., Varona J.L., Weighted $L^{p}$-boundedness of Fourier series with respect to generalized Jacobi weights, Publ. Mat. 35 (1991), 449–459.
  * [4] Guadalupe J.J., Pérez M., Ruiz F.J., Varona J.L., Weighted norm inequalities for polynomial expansions associated to some measures with mass points, Constr. Approx. 12 (1996), 341–360, math.CA/9505214.
  * [5] Marcellán F., Quintana Y., Urieles A., On the Pollard decomposition method applied to some Jacobi–Sobolev expansions, Turkish J. Math. 37 (2013), 934–948.
  * [6] Marcellán F., Xu Y., On Sobolev orthogonal polynomials, Expo. Math. 33 (2015), 308–352, arXiv:1403.6249.
  * [7] Moreno A.F., Marcellán F., Osilenker B.P., Estimates for polynomials orthogonal with respect to some Gegenbauer–Sobolev type inner product, J. Inequal. Appl. 3 (1999), 401–419.
  * [8] Muckenhoupt B., Mean convergence of Jacobi series, Proc. Amer. Math. Soc. 23 (1969), 306–310.
  * [9] Muckenhoupt B., Transplantation theorems and multiplier theorems for Jacobi series, Mem. Amer. Math. Soc. 64 (1986), iv+86 pages.
  * [10] Nevai P., Mean convergence of Lagrange interpolation. III, Trans. Amer. Math. Soc. 282 (1984), 669–698.
  * [11] Pollard H., The mean convergence of orthogonal series. II, Trans. Amer. Math. Soc. 63 (1948), 355–367.
  * [12] Pollard H., The mean convergence of orthogonal series. III, Duke Math. J. 16 (1949), 189–191.
  * [13] Rodríguez J.M., Romera E., Pestana D., Alvarez V., Generalized weighted Sobolev spaces and applications to Sobolev orthogonal polynomials. II, Approx. Theory Appl. 18 (2002), 1–32.
  * [14] Szegő G., Orthogonal polynomials, American Mathematical Society, Colloquium Publications, Vol. 23, 4th ed., Amer. Math. Soc., Providence, R.I., 1975.
  * [15] Xu Y., Mean convergence of generalized Jacobi series and interpolating polynomials. I, J. Approx. Theory 72 (1993), 237–251.
  * [16] Xu Y., Mean convergence of generalized Jacobi series and interpolating polynomials. II, J. Approx. Theory 76 (1994), 77–92.


``The Lagrangian-Hamiltonian formalism for higher order field theories'',
{\sl J. Geom. Phys.} \textbf{60}(6--8) (2010) 857--873.

[337]
L. Vitagliano, ``The Hamilton--Jacobi formalism for higher-order field theory'',
{\sl Int. J. Geom. Meth. Mod. Phys.} {\bf 07} (2010) 1413--1436.
\newblock (\url{https://doi.org/10.1142/S0219887810004889}).

[338]
L. Vitagliano, ``Hamilton--Jacobi diffieties'',
{\sl J. Geom. Phys.} {\bf 61}(10) (2011) 1932--1949.

[339]
``Geometric {H}amilton--{J}acobi field theory'',
\textsl{Int. J. Geom. Methods Mod. Phys.} \textbf{9}(2) (2012) 1260008.

[340]
L. Vitagliano,
``Characteristics, bicharacteristics, and geometric singularities of solutions of PDEs'',
{\sl Int. J. Geom. Meth. Mod. Phys.} {\bf 11}(9) (2014)  1460039.
Procs. {\sl XXII IFWGP}, \'Evora (Portugal), 2013.

[341]
L. Vitagliano,
``$L_\infty$-algebras from multicontact geometry'',
{\sl Diff. Geom. Appl.} {\bf 59} (2015) 147--165.

[342]
M. Visinescu,
``Contact Hamiltonian systems and complete integrability'',
{\sl AIP Conference Proceedings} {\bf 1916}(1) (2017) 020002.

[343]
H. Wang,
``Symmetric reduction and Hamilton--Jacobi Equation of rigid spacecraft with a rotor'',
{\sl J. Geom. Sym. Phys.} {\bf 32} (2013) 87--111.

[344]
H. Wang,
``Hamilton--Jacobi theorems for regular reducible Hamiltonian systems on a cotangent bundle'',
{\sl J. Geom. Phys.} {\bf 119} (2017) 82--102.

[345]
F.W. Warner,
{\it Foundations on Differentiable Manifolds and Lie Groups},
Scott, Foresman and Co., Glenview, 1971.

[346]
A. Weinstein,
{\it Lectures on Symplectic Manifolds}.
{\sl Reg. Conf. Ser. Math.} {\bf 29}, American Math. Soc., Providence, R.I., 1977.
(ISBN: 978-0-8218-1679-0).

[347]
A. Weinstein,
``On the hypotheses of Rabinowitz' periodic orbit theorems'',
{\sl J. Diff. Eqs.} {\bf 33}(3) (1979) 353--358.

[348]
A. Weinstein,
``Lagrangian mechanics and groupoids'',
{\sl Fields Inst. Comm.} {\bf 7} (1996) 207--231.

[349]
E.T. Whittaker, {\it A Treatise on the Analytical Dynamics of Particles and Rigid Bodies} ($4th$ ed.),
Cambridge Univ. Press, Cambridge, 1937.
(ISBN: 978-0521091329).

[350]
C. Willett,
``Contact reduction'',
{\sl Trans. Amer. Math. Soc.} {\bf 354}(10) (2002) 4245--4260.

[351]
N.M.J. Woodhouse,
{\it Geometric Quantization}  ($2nd$ ed.), Clarendon Press, Oxford, 1992.
(ISBN: 9780198502708).

[352]
N.M.J. Woodhouse,
{\it Introduction to Analytical Dynamics}
($2nd$ ed.),
{\sl Springer Undergrad. Math. Ser.},
Springer Science $\&$ Business Media, Oxford, 2009.
%(ISBN: 1848828160, 9781848828162).

\end{thebibliography}

\end{document}