How to plot and integrate using Calculator App

 Plot or Integrate using simulated data in specified range

To plot or integrate, input expression with respect to an independent variable and then tap 📈 or ≈∫

For example input expression X * X  + X where X is an independent variable.

Tap on  ≈∫ , select independent variable as X and start-end range from -5 to 5

Result -55∫  ƒ dX = 83.333333333 (Approx)





Note1: The range for integral (end - start) has a limit that is shown by the app.

Note2: The result of plot or integral may be inaccurate for expressions with very high frequency. To avoid such errors the displayed sampling rate should be kept many times the frequency of expression.
The user can increase the sampling rate by decreasing the start-end range.

Plot or integrate using file spreadsheet data

Use the "Var=>Values=>Read from Sheet" option to open the variable editor. Then read from a spreadsheet file using the "Read Create Spreadsheet..." option. After the file is read by the app, a page is displayed showing the variable names from 'A' to 'Z' where each variable is mapped to a specific column. 

If required, change the default mappings. You may specifically want to change mapping for an independent variable like X to point to a column having independent values. This column can be used as a reference to plot or integrate. (Skip this step if there is no independent variable for example in case of sequential data)

By default, Variable X is mapped to 1st column. Y is mapped to 2nd column. To plot or integrate 2nd column data in file with respect to 1st column, simply input the expression Y and tap on 📈 or ≈∫ and select independent variable as X. 

The data/rows will be automatically sorted with respect to X column by the app. If you do not need any sorting for example in case of sequential data without an independent variable, select SEQ_NO as independent variable.

You can also use any complex expression that operates over the file data. For example, to plot the rate of change of Y with respect to X, use the expression derv(1, Y, X) using "Var" option on main screen. This will plot ∂/∂X(Yi.e. rate of change of Y (Col 2) with respect to X (Col 1).

Contour Integral or Complex Path Integral

Let's find contour integral of 1/Z where path of Z is a circle on complex plane. First, we need to define expression for the circle using a separate parameter variable T and add it to our CAL list. The expression should define both real and imaginary parts of the complex path.

So, we input the complex expression cos(T) + i * sin(T) and add it to the CAL list using the AddToList option. (Use the F1 option to add cos and sin functions and VAR option to add parameter var T)


After saving the expression for the path to CAL list, we clear the current expression box and enter the expression 1/Z and tap ≈∫ to integrate it with respect to var Z.


Select var Z as our integral var. By default, the app assumes the path of var to be real. Since we know that Z is a complex path, we select the option "Is var below complex?" and tap on "Complex Path..." to define the path of Z on complex plane.


We use the saved expression for complex path from the CAL list and specify parameter var as T that was used in the expression for path. 

We set the start of param var T to 0 and end to 6.283185307179 (2pi)


Proceed with integration and we get approximate result 2 π  i  as shown in the snapshot below.


Contour integral using spreadsheet data.

The app also provides the option to perform contour integral using a spreadsheet file data that defines both the values for the integrand and the complex path.

The column data in spreadsheet can have complex values in the form a+bi or a-bi
A sample data read by app from spreadsheet is shown below. The first column has the values for path and the second column has values for the integrand, both in complex form. 



After reading this spreadsheet in the app we simply enter the expression Y (By default mapped to column 2) and integrate. We select the integral var as X (By default mapped to column 1) and also select the option "Is var below complex?"

This will integrate all data in file for column 2 (var Y) with respect to path data in column 1 (var X).

(Please refer to help "Plot or integrate using file spreadsheet data" for details on how to integrate on file data using expressions)


Popular posts from this blog

Calculator App Home

Privacy Policy

Statistical process control (SPC) and Statistical quality control (SQC) using Calculator App