Difference between revisions of "NIntegral Command"

From GeoGebra Manual
Jump to: navigation, search
(The basic syntax works outside of CAS too.)
(changed the example for the primitive through a point)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.2}}</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude>{{command|geogebra}}
{{command|geogebra}}
+
;NIntegral( <Function>, <Start x-Value>, <End x-Value> )
;NIntegral[ <Function>, <Start x-Value>, <End x-Value> ]
+
:Computes (numerically) the definite integral <math>\int_a^bf(x)\mathrm{d}x</math> of the given function ''f'', from ''a'' (''Start x-Value'') to ''b'' (''End x-Value'').
:Let ''a'' be the ''Start x-Value'', ''b'' be the ''End x-Value'' and ''f'' the ''Function''. NIntegral-command computes the definite integral <math>\int_a^bf(x)\mathrm{d}x</math> numerically.
+
:{{example| 1=<code><nowiki>NIntegral(ℯ^(-x^2), 0, 1)</nowiki></code> yields ''0.75''.}}
==CAS Syntax==
 
;NIntegral[ <Function>, <Start x-Value>, <End x-Value> ]
 
:Let ''a'' be the ''Start x-Value'', ''b'' be the ''End x-Value'' and ''f'' the ''Function''. NIntegral-command computes the definite integral <math>\int_a^bf(x)\mathrm{d}x</math> numerically.
 
:{{example| 1=<div><code><nowiki>NIntegral[ℯ^(-x^2), 0, 1]</nowiki></code> yields ''0.746824132812427''.</div>}}
 
  
;NIntegral[ <Function>, <Variable>, <Start Value>, <End Value> ]
+
;NIntegral( <Function>, <Start x-Value>, <Start y-Value>, <End x-Value> )
:Let ''a'' be the ''Start x-Value'', ''b'' be the ''End x-Value'', ''f'' the ''Function'' and ''t'' the ''Variable'' to integrate. NIntegral-command computes the definite integral <math>\int_a^bf(t)\mathrm{d}t</math> numerically.
+
:Computes (numerically) the indefinite integral of the given function, and plots the graph of that function through (''Start x-Value'', ''Start y-Value''), with end point at (''End x-Value'').
:{{example| 1=<div><code><nowiki>NIntegral[ℯ^(-a^2), a, 0, 1]</nowiki></code> yields ''0.746824132812427''.</div>}}
+
:{{example| 1=<code><nowiki>NIntegral(sin(x)/x, π, 1, 2π)</nowiki></code> plots the graph of the indefinite integral <math>y=F(x)+c</math> of the given function in the interval [π, 2π]. The value of <math>c</math> is defined by the initial condition (start x-Value, start y-Value)=(π, 1).}}
 +
 
 +
{{hint|1=In the [[File:Menu view cas.svg|link=|16px]] [[CAS View]] the following syntax can also be used:
 +
<br>
 +
;NIntegral( <Function>, <Variable>, <Start Value>, <End Value> )
 +
:Computes (numerically) the definite integral <math>\int_a^bf(t)\mathrm{d}x</math> of the given function ''f'', from ''a'' (''Start value'') to ''b'' (''End value''), with respect to the given variable.
 +
:{{example| 1=<code><nowiki>NIntegral(ℯ^(-a^2), a, 0, 1)</nowiki></code> yields ''0.75''.}}
 +
}}

Latest revision as of 14:54, 18 August 2022


NIntegral( <Function>, <Start x-Value>, <End x-Value> )
Computes (numerically) the definite integral \int_a^bf(x)\mathrm{d}x of the given function f, from a (Start x-Value) to b (End x-Value).
Example: NIntegral(ℯ^(-x^2), 0, 1) yields 0.75.


NIntegral( <Function>, <Start x-Value>, <Start y-Value>, <End x-Value> )
Computes (numerically) the indefinite integral of the given function, and plots the graph of that function through (Start x-Value, Start y-Value), with end point at (End x-Value).
Example: NIntegral(sin(x)/x, π, 1, 2π) plots the graph of the indefinite integral y=F(x)+c of the given function in the interval [π, 2π]. The value of c is defined by the initial condition (start x-Value, start y-Value)=(π, 1).


Note Hint: In the Menu view cas.svg CAS View the following syntax can also be used:


NIntegral( <Function>, <Variable>, <Start Value>, <End Value> )
Computes (numerically) the definite integral \int_a^bf(t)\mathrm{d}x of the given function f, from a (Start value) to b (End value), with respect to the given variable.
Example: NIntegral(ℯ^(-a^2), a, 0, 1) yields 0.75.
© 2024 International GeoGebra Institute