<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>December</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>A Mathematica Package for Graphing Equations and Inequalities in Non-Rectangular Coordinate Systems</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Rolando E. Ipanaqué-Silva</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Elmer P. Díaz-Contreras</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Jorge L. Viera-Jiménez</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Iván D. Imán-Agurto</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Robert Ipanaqué-Chero</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Universidad Nacional de Piura</institution>
          ,
          <addr-line>Urb. Miraflores s/n Castilla, Piura</addr-line>
          ,
          <country country="PE">Perú</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Universidad Tecnológica del Perú</institution>
          ,
          <addr-line>Av. Vice Cdra 1-Costado Real Plaza, Piura</addr-line>
          ,
          <country country="PE">Perú</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2023</year>
      </pub-date>
      <volume>0</volume>
      <fpage>4</fpage>
      <lpage>06</lpage>
      <abstract>
        <p>Solving and plotting inequalities are crucial mathematical skills that have a significant impact on problem-solving in a variety of disciplines. These tools provide an efective way to represent and analyze numerical and geometric relationships, facilitating decision-making, planning, and understanding complex situations in everyday life and professional fields. This paper presents and describes a new package coded in the Wolfram Language of the Mathematica symbolic calculation system, NRGraphics, which allows plotting equations and inequalities in non-rectangular plane coordinate systems. The authors have developed this package to provide a tool for the teaching process of graphical representation of equations and inequalities in non-rectangular plane coordinate systems.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Non-rectangular coordinates</kwd>
        <kwd>Wolfram Language</kwd>
        <kwd>equations</kwd>
        <kwd>inequalities</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Solving inequalities constitutes an essential topic in mathematics with outstanding applications
in many problems of theoretical and applied science [
        <xref ref-type="bibr" rid="ref1 ref2 ref3 ref4">1, 2, 3, 4</xref>
        ].
      </p>
      <p>
        The symbolic calculation system Mathematica stands out on this topic among its competitors
because it includes commands that solve inequalities that involve more than one variable [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
In addition, it contains commands that allow obtaining the graphs of the regions of the plane in
the Cartesian coordinate system, which are the solution set of inequalities of this type [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>
        However, although there are many general-purpose or specific-purpose computer algebra
systems [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], none have been found that allow obtaining the graphs of equations and inequalities
in non-rectangular plane coordinate systems.
2. Domain theory and previous work
The graphical representation of inequalities in the Cartesian coordinate system in the plane
can be performed without significant complications with the RegionPlot command
incorporated into Mathematica [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. However, Mathematica does not include any command to graph
inequalities in non-Cartesian coordinates in the plane.
      </p>
      <p>
        There is a contribution from user Heike on the Mathematica Stack Exchange blog to graph
equations in polar coordinates given implicitly [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. From this contribution, the fundamental
idea can be extracted to develop an algorithm to modify points on the plane graphed with
      </p>
      <sec id="sec-1-1">
        <title>Mathematica via transformations.</title>
        <p>On the other hand, Mathematica incorporates the PolarPlot command. However, this
command is limited to polar coordinates and explicit expressions of  =  ( ). On the other
hand, our package is not limited to polar coordinates and can operate, in particular, with implicit
expressions of the form (,  ) = 0. The following example shows us the existing limitation.</p>
        <p>Mathematica
Is impossible plot 2 − cos(2 ) = 0 with PolarPlot.</p>
        <p>
          In[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]:= PolarPlot[r^2-Cos[2* ]==0,{r,0,1},{t,0,2*Pi}]
        </p>
        <p>
          Out[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]= PolarPlot::nonopt
        </p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>3. The package: NRGraphics</title>
      <p>The NRGraphics package includes two commands: ContourNonCartesianPlot and</p>
      <sec id="sec-2-1">
        <title>InequalityNonCartesianPlot. The syntaxes of both commands are:</title>
        <p>ContourNonCartesianPlot[(, ), {, 1, 2}, {, 1, 2},options]
and</p>
        <p>InequalityNonCartesianPlot[(, ), {, 1, 2}, {, 1, 2},options]
(, ) is an equation for  and ; (, ) is an expression of inequalities and Boolean operators.</p>
      </sec>
      <sec id="sec-2-2">
        <title>All graphical results are displayed in the rectangle:</title>
        <p>1 ≤  ≤ 2 ∧ 1 ≤  ≤ 2 .</p>
        <p>Both commands are similar to the ContourPlot and RegionPlot commands, respectively,
that Mathematica incorporates.</p>
      </sec>
      <sec id="sec-2-3">
        <title>This package is hosted at</title>
      </sec>
      <sec id="sec-2-4">
        <title>And the way to install it is explained in https://support.wolfram.com/5648?src=mathematica</title>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>4. Results</title>
      <sec id="sec-3-1">
        <title>First, we initialize the package:</title>
        <p>Mathematica</p>
        <sec id="sec-3-1-1">
          <title>Initialization of the NRGraphics.m package.</title>
          <p>
            In[
            <xref ref-type="bibr" rid="ref1">1</xref>
            ]:= «NRGraphics.m
          </p>
          <p>Below are examples of graphs obtained with the commands incorporated in the package and
whose syntax was disclosed in the previous section.</p>
          <p>Mathematica
Plot the contours of 2 − cos(2) in polar coordinates.</p>
          <p>
            In[
            <xref ref-type="bibr" rid="ref2">2</xref>
            ]:= ContourNonCartesianPlot[r^2-Cos[2*t],{r,0,1},{t,0,2*Pi}]
Out[
            <xref ref-type="bibr" rid="ref2">2</xref>
            ]= See Fig. 1 (left).
          </p>
          <p>Mathematica
Plot an equation, 2 − cos(2) = 0, in polar coordinates.</p>
          <p>
            In[
            <xref ref-type="bibr" rid="ref3">3</xref>
            ]:= ContourNonCartesianPlot[r^2-Cos[2*t]==0,{r,0,1},{t,0,2*Pi}]
Out[
            <xref ref-type="bibr" rid="ref3">3</xref>
            ]= See Fig. 1 (right).
          </p>
          <p>Mathematica
Plot an equation,  − 2(1 + cos()) = 0, in polar coordinates.</p>
          <p>
            In[
            <xref ref-type="bibr" rid="ref4">4</xref>
            ]:= ContourNonCartesianPlot[r-2*(1+Cos[t])==0,{r,0,4},{t,0,2*Pi}]
Out[
            <xref ref-type="bibr" rid="ref4">4</xref>
            ]= See Fig. 2 (left).
          </p>
          <p>Mathematica
Plot two equations, 2 − cos(2) = 0,  − (1 + cos()) = 0, in polar coordinates.</p>
          <p>
            In[
            <xref ref-type="bibr" rid="ref6">6</xref>
            ]:= ContourNonCartesianPlot[{r^2-Cos[2*t]==0,r-(1+Cos[t])==0},
{r,0,2},{t,0,2*Pi}]
Out[
            <xref ref-type="bibr" rid="ref6">6</xref>
            ]= See Fig. 3.
          </p>
          <p>Mathematica
Plot an inequality,  − 2(1 + cos()) ≤ 0, in polar coordinates.</p>
          <p>
            In[
            <xref ref-type="bibr" rid="ref7">7</xref>
            ]:= InequalityNonCartesianPlot[r^2-Cos[2*t]&lt;=0,{r,0,1},{t,0,2*Pi}]
Out[
            <xref ref-type="bibr" rid="ref7">7</xref>
            ]= See Fig. 4 (left).
          </p>
          <p>Mathematica
Plot an inequality, 2 − cos(2) &lt; 0 ∧  − (1 + cos()) &lt; 0, in polar coordinates.</p>
          <p>
            In[
            <xref ref-type="bibr" rid="ref8">8</xref>
            ]:= InequalityNonCartesianPlot[r^2-Cos[2*t]&lt;0&amp;&amp;
          </p>
          <p>r-(1+Cos[t])&lt;0,{r,0,2},{t,0,2*Pi}]</p>
          <p>
            Out[
            <xref ref-type="bibr" rid="ref8">8</xref>
            ]= See Fig. 4 (right).
          </p>
          <p>Mathematica</p>
        </sec>
        <sec id="sec-3-1-2">
          <title>Definition of the omega number.</title>
          <p>
            Next, the following problem will be solved: Find a transformation  : R2 → R2 from a plane
 to a plane  that transforms a region  of the  plane in a region  () of the  plane,
bounded by the graphs of 2 − 2 = 9, 2 − 2 = 1,  = 2,  = 4, for  &gt; 0 [
            <xref ref-type="bibr" rid="ref9">9</xref>
            ].
          </p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>The proposed solution to the problem is provided below.</title>
        <p>Mathematica
Calculation of the coordinate functions  = 1(, ),  = 2(, ), of the transformation  , from (, ) =
(2 − 2, 2).</p>
        <p>In[14]:= Reduce[{u,v}=={x^2-y^2,2xy}&amp;&amp; x&gt;0&amp;&amp; u&gt;0&amp;&amp; v&gt;0,{x,y}]
Out[14]=  &gt; 0&amp;&amp; &gt; 0&amp;&amp; == Root[− 2 − 4#12 + 4#14&amp;, 2]&amp;&amp; == /(2)
Mathematica
Plotting the region  : 1 ≤  ≤ 9 ∧ 4 ≤  ≤ 8 in the  plane.</p>
        <p>In[15]:= InequalityNonCartesianPlot[1 ≤  ≤ 9 ∧ 4 ≤  ≤ 8,</p>
        <p>{u,-1,11},{v,2,10},Transformation-&gt;Function[{u,v},{u,v}]]
Out[15]= See Fig. 6 (left).</p>
        <p>Mathematica</p>
        <sec id="sec-3-2-1">
          <title>Defining the transformation  and plotting the region  () in the  plane.</title>
          <p>In[16]:= T=Function[{u,v},{x=Root[-v^2-4*u*#1^2+4*#1^4&amp;,2],v/(2*x)}];
InequalityNonCartesianPlot[1 ≤  ≤ 9 ∧ 4 ≤  ≤ 8,</p>
          <p>{u,-1,11},{v,2,10},Transformation-&gt;T]</p>
          <p>Out[17]= See Fig. 6 (right).</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>5. Conclusions and future work</title>
      <p>In this paper, the new NRGraphics.m package is presented and described. The NRGraphics.m
package includes two commands to obtain graphs of equations and inequalities in plane
nonrectangular coordinate systems. The coding of the package has been done in Mathematica
v.11.2.0.0, but it can run in later versions. All the results shown in this paper have been obtained
on an HP laptop with an Intel(R) Core(TM) i3-3110M CPU @ 2.40 GHz, with a RAM of 4.00
GB, 64-bit Operating System, and × 64 processor. The authors are committed to developing
command packages linked to education, and a short-term objective is to improve the package
so that it allows graphing equations in three-dimensional non-rectangular coordinate systems
so that any subsequent results will be published by this means.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>E. F.</given-names>
            <surname>Beckenbach</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Bellman</surname>
          </string-name>
          ,
          <article-title>An introduction to inequalities, number 3 in New mathematical library</article-title>
          ,
          <volume>13</volume>
          . print ed.,
          <source>Math. Assoc. of America</source>
          , Washington,
          <year>1983</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>G. H.</given-names>
            <surname>Hardy</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. E.</given-names>
            <surname>Littlewood</surname>
          </string-name>
          , G. Pólya, Inequalities, Cambridge University Press,
          <year>1952</year>
          .
          <article-title>Google-Books-ID: t1RCSP8YKt8C.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Mitrinović</surname>
          </string-name>
          , Analytic Inequalities, Springer, Berlin, Heidelberg,
          <year>1970</year>
          . URL: http://link. springer.com/10.1007/978-3-
          <fpage>642</fpage>
          -99970-3. doi:
          <volume>10</volume>
          .1007/978-3-
          <fpage>642</fpage>
          -99970-3.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>D. S.</given-names>
            <surname>Mitrinović</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Pečarić</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Volenec</surname>
          </string-name>
          , Recent Advances in Geometric Inequalities (
          <year>1989</year>
          ). URL: https://typeset.io/papers/recent
          <article-title>-advances-in-geometric-inequalities-4x9cek6agp.</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>Manipulating</given-names>
            <surname>Equations</surname>
          </string-name>
          and
          <string-name>
            <surname>Inequalities-Wolfram Language</surname>
            <given-names>Documentation</given-names>
          </string-name>
          ,
          <year>2016</year>
          . URL: https://reference.wolfram.com/language/tutorial/ManipulatingEquationsAndInequalities. html#
          <volume>9389</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <article-title>[6] RegionPlot: Plot regions defined by inequalities-</article-title>
          <string-name>
            <surname>Wolfram</surname>
            <given-names>Documentation</given-names>
          </string-name>
          ,
          <year>2016</year>
          . URL: https://reference.wolfram.com/language/ref/RegionPlot.html?q=RegionPlot.
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          <source>[7] List of computer algebra systems</source>
          ,
          <year>2023</year>
          . URL: https://en.wikipedia.org/w/index.php?title= List_of_computer_
          <source>algebra_systems&amp;oldid=1178253292</source>
          ,
          <string-name>
            <surname>page Version</surname>
            <given-names>ID</given-names>
          </string-name>
          :
          <fpage>1178253292</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          <article-title>[8] one-more minute</article-title>
          ,
          <source>Plotting an implicit polar equation</source>
          ,
          <year>2017</year>
          . URL: https://mathematica. stackexchange.com/q/547.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>J. A.</given-names>
            <surname>Venero</surname>
          </string-name>
          ,
          <string-name>
            <surname>Matemáticas</surname>
            <given-names>III</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Representaciones</surname>
            <given-names>Gemar E.I.R.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lima</surname>
          </string-name>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>