<!DOCTYPE html>

<html>
  <head>
    <meta charset="utf-8">
    
    <title>numpy.polynomial.laguerre.lagint &mdash; NumPy v1.10 Manual</title>
    
    <link rel="stylesheet" type="text/css" href="../../static_/css/spc-bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../../static_/css/spc-extend.css">
    <link rel="stylesheet" href="../../static_/scipy.css" type="text/css" >
    <link rel="stylesheet" href="../../static_/pygments.css" type="text/css" >
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     '1.10.1',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  false
      };
    </script>
    <script type="text/javascript" src="../../static_/jquery.js"></script>
    <script type="text/javascript" src="../../static_/underscore.js"></script>
    <script type="text/javascript" src="../../static_/doctools.js"></script>
    <script type="text/javascript" src="../../static_/js/copybutton.js"></script>
    <link rel="author" title="About these documents" href="../../about.html" >
    <link rel="top" title="NumPy v1.10 Manual" href="../../index.html" >
    <link rel="up" title="Laguerre Module (numpy.polynomial.laguerre)" href="../routines.polynomials.laguerre.html" >
    <link rel="next" title="numpy.polynomial.laguerre.lagadd" href="numpy.polynomial.laguerre.lagadd.html" >
    <link rel="prev" title="numpy.polynomial.laguerre.lagder" href="numpy.polynomial.laguerre.lagder.html" > 
  </head>
  <body>

  <div class="container">
    <div class="header">
    </div>
  </div>


    <div class="container">
      <div class="main">
        
	<div class="row-fluid">
	  <div class="span12">
	    <div class="spc-navbar">
              
    <ul class="nav nav-pills pull-left">
        
        <li class="active"><a href="../../index.html">NumPy v1.10 Manual</a></li>
        

          <li class="active"><a href="../index.html" >NumPy Reference</a></li>
          <li class="active"><a href="../routines.html" >Routines</a></li>
          <li class="active"><a href="../routines.polynomials.html" >Polynomials</a></li>
          <li class="active"><a href="../routines.polynomials.package.html" >Polynomial Package</a></li>
          <li class="active"><a href="../routines.polynomials.laguerre.html" accesskey="U">Laguerre Module (<tt class="docutils literal"><span class="pre">numpy.polynomial.laguerre</span></tt>)</a></li> 
    </ul>
              
              
    <ul class="nav nav-pills pull-right">
      <li class="active">
        <a href="../../genindex.html" title="General Index"
           accesskey="I">index</a>
      </li>
      <li class="active">
        <a href="numpy.polynomial.laguerre.lagadd.html" title="numpy.polynomial.laguerre.lagadd"
           accesskey="N">next</a>
      </li>
      <li class="active">
        <a href="numpy.polynomial.laguerre.lagder.html" title="numpy.polynomial.laguerre.lagder"
           accesskey="P">previous</a>
      </li>
    </ul>
              
	    </div>
	  </div>
	</div>
        

	<div class="row-fluid">
      <div class="spc-rightsidebar span3">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="numpy.polynomial.laguerre.lagder.html"
                        title="previous chapter">numpy.polynomial.laguerre.lagder</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="numpy.polynomial.laguerre.lagadd.html"
                        title="next chapter">numpy.polynomial.laguerre.lagadd</a></p>


        </div>
      </div>
          <div class="span9">
            
        <div class="bodywrapper">
          <div class="body" id="spc-section-body">
            
  <div class="section" id="numpy-polynomial-laguerre-lagint">
<h1>numpy.polynomial.laguerre.lagint<a class="headerlink" href="#numpy-polynomial-laguerre-lagint" title="Permalink to this headline">¶</a></h1>
<dl class="function">
<dt id="numpy.polynomial.laguerre.lagint">
<tt class="descclassname">numpy.polynomial.laguerre.</tt><tt class="descname">lagint</tt><big>(</big><em>c</em>, <em>m=1</em>, <em>k=</em>, <span class="optional">[</span><span class="optional">]</span><em>lbnd=0</em>, <em>scl=1</em>, <em>axis=0</em><big>)</big><a class="reference external" href="http://github.com/numpy/numpy/blob/v1.10.1/numpy/polynomial/laguerre.py#L726-L850"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#numpy.polynomial.laguerre.lagint" title="Permalink to this definition">¶</a></dt>
<dd><p>Integrate a Laguerre series.</p>
<p>Returns the Laguerre series coefficients <em class="xref py py-obj">c</em> integrated <em class="xref py py-obj">m</em> times from
<em class="xref py py-obj">lbnd</em> along <em class="xref py py-obj">axis</em>. At each iteration the resulting series is
<strong>multiplied</strong> by <em class="xref py py-obj">scl</em> and an integration constant, <em class="xref py py-obj">k</em>, is added.
The scaling factor is for use in a linear change of variable.  (&#8220;Buyer
beware&#8221;: note that, depending on what one is doing, one may want <em class="xref py py-obj">scl</em>
to be the reciprocal of what one might expect; for more information,
see the Notes section below.)  The argument <em class="xref py py-obj">c</em> is an array of
coefficients from low to high degree along each axis, e.g., [1,2,3]
represents the series <tt class="docutils literal"><span class="pre">L_0</span> <span class="pre">+</span> <span class="pre">2*L_1</span> <span class="pre">+</span> <span class="pre">3*L_2</span></tt> while [[1,2],[1,2]]
represents <tt class="docutils literal"><span class="pre">1*L_0(x)*L_0(y)</span> <span class="pre">+</span> <span class="pre">1*L_1(x)*L_0(y)</span> <span class="pre">+</span> <span class="pre">2*L_0(x)*L_1(y)</span> <span class="pre">+</span>
<span class="pre">2*L_1(x)*L_1(y)</span></tt> if axis=0 is <tt class="docutils literal"><span class="pre">x</span></tt> and axis=1 is <tt class="docutils literal"><span class="pre">y</span></tt>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>c</strong> : array_like</p>
<blockquote>
<div><p>Array of Laguerre series coefficients. If <em class="xref py py-obj">c</em> is multidimensional
the different axis correspond to different variables with the
degree in each axis given by the corresponding index.</p>
</div></blockquote>
<p><strong>m</strong> : int, optional</p>
<blockquote>
<div><p>Order of integration, must be positive. (Default: 1)</p>
</div></blockquote>
<p><strong>k</strong> : {[], list, scalar}, optional</p>
<blockquote>
<div><p>Integration constant(s).  The value of the first integral at
<tt class="docutils literal"><span class="pre">lbnd</span></tt> is the first value in the list, the value of the second
integral at <tt class="docutils literal"><span class="pre">lbnd</span></tt> is the second value, etc.  If <tt class="docutils literal"><span class="pre">k</span> <span class="pre">==</span> <span class="pre">[]</span></tt> (the
default), all constants are set to zero.  If <tt class="docutils literal"><span class="pre">m</span> <span class="pre">==</span> <span class="pre">1</span></tt>, a single
scalar can be given instead of a list.</p>
</div></blockquote>
<p><strong>lbnd</strong> : scalar, optional</p>
<blockquote>
<div><p>The lower bound of the integral. (Default: 0)</p>
</div></blockquote>
<p><strong>scl</strong> : scalar, optional</p>
<blockquote>
<div><p>Following each integration the result is <em>multiplied</em> by <em class="xref py py-obj">scl</em>
before the integration constant is added. (Default: 1)</p>
</div></blockquote>
<p><strong>axis</strong> : int, optional</p>
<blockquote>
<div><p>Axis over which the integral is taken. (Default: 0).</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 1.7.0.</span></p>
</div>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>S</strong> : ndarray</p>
<blockquote>
<div><p>Laguerre series coefficients of the integral.</p>
</div></blockquote>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first"><strong>ValueError</strong></p>
<blockquote class="last">
<div><p>If <tt class="docutils literal"><span class="pre">m</span> <span class="pre">&lt;</span> <span class="pre">0</span></tt>, <tt class="docutils literal"><span class="pre">len(k)</span> <span class="pre">&gt;</span> <span class="pre">m</span></tt>, <tt class="docutils literal"><span class="pre">np.isscalar(lbnd)</span> <span class="pre">==</span> <span class="pre">False</span></tt>, or
<tt class="docutils literal"><span class="pre">np.isscalar(scl)</span> <span class="pre">==</span> <span class="pre">False</span></tt>.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="numpy.polynomial.laguerre.lagder.html#numpy.polynomial.laguerre.lagder" title="numpy.polynomial.laguerre.lagder"><tt class="xref py py-obj docutils literal"><span class="pre">lagder</span></tt></a></p>
</div>
<p class="rubric">Notes</p>
<p>Note that the result of each integration is <em>multiplied</em> by <em class="xref py py-obj">scl</em>.
Why is this important to note?  Say one is making a linear change of
variable <img class="math" src="../../images_/math/0fd237ce10d293b0e64ed3fb4b45e59ad541a794.png" alt="u = ax + b" style="vertical-align: -1px"/> in an integral relative to <em class="xref py py-obj">x</em>.  Then
.. math::<em class="xref py py-obj">dx = du/a</em>, so one will need to set <em class="xref py py-obj">scl</em> equal to
<img class="math" src="../../images_/math/991aa4b1f8dc7e87dc834a2b161a376e1b0d1e7e.png" alt="1/a" style="vertical-align: -4px"/> - perhaps not what one would have first thought.</p>
<p>Also note that, in general, the result of integrating a C-series needs
to be &#8220;reprojected&#8221; onto the C-series basis set.  Thus, typically,
the result of this function is &#8220;unintuitive,&#8221; albeit correct; see
Examples section below.</p>
<p class="rubric">Examples</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">from</span> <span class="nn">numpy.polynomial.laguerre</span> <span class="kn">import</span> <span class="n">lagint</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">lagint</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">])</span>
<span class="go">array([ 1.,  1.,  1., -3.])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">lagint</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="n">m</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
<span class="go">array([ 1.,  0.,  0., -4.,  3.])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">lagint</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="n">k</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="go">array([ 2.,  1.,  1., -3.])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">lagint</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">],</span> <span class="n">lbnd</span><span class="o">=-</span><span class="mi">1</span><span class="p">)</span>
<span class="go">array([ 11.5,   1. ,   1. ,  -3. ])</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">lagint</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">],</span> <span class="n">m</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">k</span><span class="o">=</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">],</span> <span class="n">lbnd</span><span class="o">=-</span><span class="mi">1</span><span class="p">)</span>
<span class="go">array([ 11.16666667,  -5.        ,  -3.        ,   2.        ])</span>
</pre></div>
</div>
</dd></dl>

</div>


          </div>
        </div>
          </div>
        </div>
      </div>
    </div>

    <div class="container container-navbar-bottom">
      <div class="spc-navbar">
        
      </div>
    </div>
    <div class="container">
    <div class="footer">
    <div class="row-fluid">
    <ul class="inline pull-left">
      <li>
        &copy; Copyright 2008-2009, The Scipy community.
      </li>
      <li>
      Last updated on Oct 18, 2015.
      </li>
      <li>
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.2.1.
      </li>
    </ul>
    </div>
    </div>
    </div>
  </body>
</html>