This file is indexed.

/usr/share/doc/pyxplot/html/sect0217.html is in pyxplot-doc 0.8.4-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta name="generator" content="plasTeX" />
<meta content="text/html; charset=utf-8" http-equiv="content-type" />
<title>PyXPlot Users' Guide: solve</title>

<link href="sect0218.html" title="spline" rel="next" />
<link href="sect0216.html" title="show" rel="prev" />
<link href="ch-reference.html" title="Command Reference" rel="up" />
<link rel="stylesheet" href="styles/styles.css" />
</head>
<body>

<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="sect0216.html" title="show"><img alt="Previous: show" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>

<td><a href="ch-reference.html" title="Command Reference"><img alt="Up: Command Reference" border="0" src="icons/up.gif" width="32" height="32" /></a></td>

<td><a href="sect0218.html" title="spline"><img alt="Next: spline" border="0" src="icons/next.gif" width="32" height="32" /></a></td>

<td class="navtitle" align="center">PyXPlot Users' Guide</td>
<td><a href="index.html" title="Table of Contents"><img border="0" alt="" src="icons/contents.gif" width="32" height="32" /></a></td>

<td><a href="sect0255.html" title="Index"><img border="0" alt="" src="icons/index.gif" width="32" height="32" /></a></td>

<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
</tr>
</table>
</div>

<div class="breadcrumbs">
<span>
<span>
<a href="index.html">PyXPlot Users' Guide</a> <b>:</b>
</span>

</span><span>
<span>
<a href="sect0075.html">Reference Manual</a> <b>:</b>
</span>

</span><span>
<span>
<a href="ch-reference.html">Command Reference</a> <b>:</b>
</span>

</span><span>

<span>
<b class="current">solve</b>
</span>
</span>
<hr />
</div>

<div><h1 id="a0000000218">1.49 solve</h1>
<p><a name="a0000001339" id="a0000001339"></a> </p><pre>
solve &lt;equation&gt; {, &lt;equation&gt;}
    via &lt;variable&gt; {, &lt;variable&gt;}
</pre><p>The <tt class="tt">solve</tt> command<a name="a0000001340" id="a0000001340"></a> can be used to solve simple systems of one or more equations numerically. It takes as its arguments a comma-separated list of the equations which are to be solved, and a comma-separated list of the variables which are to be found. The latter should be prefixed by the word <tt class="tt">via</tt>, to separate it from the list of equations. </p><p>Note that the time taken by the solver dramatically increases with the number of variables which are simultaneously found, whereas the accuracy achieved simultaneously decreases. The following example solves a simple pair of simultaneous equations of two variables: </p><pre>
pyxplot&gt; solve x+y=10, x-y=3 via x,y
pyxplot&gt; print x
6.5
pyxplot&gt; print y
3.5
</pre><p>No output is returned to the terminal if the numerical solver succeeds, otherwise an error message is displayed. If any of the fitting variables are already defined prior to the <tt class="tt">solve</tt> command’s being called, their values are used as initial guesses, otherwise an initial guess of unity for each fitting variable is assumed. Thus, the same <tt class="tt">solve</tt> command<a name="a0000001341" id="a0000001341"></a> returns two different values in the following two cases: </p><pre>
pyxplot&gt; x= # Undefine x
pyxplot&gt; solve cos(x)=0 via x
pyxplot&gt; print x/pi
0.5
pyxplot&gt; x=10
pyxplot&gt; solve cos(x)=0 via x
pyxplot&gt; print x/pi
3.5
</pre><p>In cases where any of the variables being solved for are not dimensionless, it is essential that an initial guess with appropriate units be supplied, otherwise the solver will try and fail to solve the system of equations using dimensionless values: </p><pre>
x = unit(m)
y = 5*unit(km)
solve x=y via x
</pre><p>The <tt class="tt">solve</tt> command works by minimising the squares of the residuals of all of the equations supplied, and so even when no exact solution can be found, the best compromise is returned. The following example has no solution – a system of three equations with two variables is over-constrained – but PyXPlot nonetheless finds a compromise solution: </p><pre>
pyxplot&gt; solve x+y=10, x-y=3, 2*x+y=16 via x,y
pyxplot&gt; print x
6.3571429
pyxplot&gt; print y
3.4285714
</pre><p>When complex arithmetic is enabled, the <tt class="tt">solve</tt> command allows each of the variables being fitted to take any value in the complex plane, and thus the number of dimensions of the fitting problem is effectively doubled – the real and imaginary components of each variable are solved for separately – as in the following example: </p><pre>
pyxplot&gt; set numerics complex
pyxplot&gt; solve exp(x)=e*i via x
pyxplot&gt; print Re(x)
1
pyxplot&gt; print Im(x)/pi
0.5
</pre></div>





<div class="navigation">
<table cellspacing="2" cellpadding="0" width="100%">
<tr>
<td><a href="sect0216.html" title="show"><img alt="Previous: show" border="0" src="icons/previous.gif" width="32" height="32" /></a></td>

<td><a href="ch-reference.html" title="Command Reference"><img alt="Up: Command Reference" border="0" src="icons/up.gif" width="32" height="32" /></a></td>

<td><a href="sect0218.html" title="spline"><img alt="Next: spline" border="0" src="icons/next.gif" width="32" height="32" /></a></td>

<td class="navtitle" align="center">PyXPlot Users' Guide</td>
<td><a href="index.html" title="Table of Contents"><img border="0" alt="" src="icons/contents.gif" width="32" height="32" /></a></td>

<td><a href="sect0255.html" title="Index"><img border="0" alt="" src="icons/index.gif" width="32" height="32" /></a></td>

<td><img border="0" alt="" src="icons/blank.gif" width="32" height="32" /></td>
</tr>
</table>
</div>

<script language="javascript" src="icons/imgadjust.js" type="text/javascript"></script>

</body>
</html>