- #1
member 428835
Hi PF!
The following function is long but only 3 command lines: first defines the function ff, second numerically integrates the function, and third plots the function. As you'll see the integral is zero yet clearly that is not the case (seen from the plot). Any idea what's happening?
The following function is long but only 3 command lines: first defines the function ff, second numerically integrates the function, and third plots the function. As you'll see the integral is zero yet clearly that is not the case (seen from the plot). Any idea what's happening?
Code:
ff = 0.5606761981314476` ((-0.1367788536270296` +
0.22165442361786794` Cos[\[Theta]] -
0.0433321923224954` Cos[2 \[Theta]] -
0.041543377668342985` Cos[3 \[Theta]] +
0.9284408543946542` Sin[\[Theta]] -
0.14311113535576353` Sin[2 \[Theta]] -
0.21464881411190453` Sin[
3 \[Theta]]) UnitStep[-0.01` + \[Theta]] -
0.054429237999962535` (-0.495726932278196` -
0.17369695482741626` Cos[\[Theta]] +
0.8347194334290977` Cos[2 \[Theta]] -
0.16529554632348553` Cos[3 \[Theta]] +
0.0005992450328750604` Sin[\[Theta]] +
0.0011984301417462028` Sin[2 \[Theta]] +
0.0017974954086018597` Sin[
3 \[Theta]]) UnitStep[-0.01` + \[Theta]] -
0.04525014706857046` (-0.19590701566884333` (-0.495726932278196` \
- 0.17369695482741626` Cos[\[Theta]] +
0.8347194334290977` Cos[2 \[Theta]] -
0.16529554632348553` Cos[3 \[Theta]] +
0.0005992450328750604` Sin[\[Theta]] +
0.0011984301417462028` Sin[2 \[Theta]] +
0.0017974954086018597` Sin[
3 \[Theta]]) UnitStep[-0.01` + \[Theta]] + \
(-0.4923077743819351` - 0.1792378074713546` Cos[\[Theta]] -
0.16419736106352353` Cos[2 \[Theta]] +
0.8357429429168132` Cos[3 \[Theta]] +
0.002388059687027475` Sin[\[Theta]] +
0.004775880570076289` Sin[2 \[Theta]] +
0.007163223869047984` Sin[
3 \[Theta]]) UnitStep[-0.01` + \[Theta]])) \
(0.5606761981314476` (( \!\(\*
TagBox[GridBox[{
{"\[Piecewise]", GridBox[{
{"Indeterminate",
RowBox[{"\[Theta]", "==", "0.01`"}]},
{"0",
TagBox["True",
"PiecewiseDefault",
AutoDelete->True]}
},
AllowedDimensions->{2, Automatic},
Editable->True,
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxItemSize->{
"Columns" -> {{Automatic}}, "ColumnsIndexed" -> {},
"Rows" -> {{1.}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.84]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}},
Selectable->True]}
},
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxItemSize->{
"Columns" -> {{Automatic}}, "ColumnsIndexed" -> {},
"Rows" -> {{1.}}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.35]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}}],
"Piecewise",
DeleteWithContents->True,
Editable->False,
SelectWithContents->True,
Selectable->False]\) ) (-0.1367788536270296` +
0.22165442361786794` Cos[\[Theta]] -
0.0433321923224954` Cos[2 \[Theta]] -
0.041543377668342985` Cos[3 \[Theta]] +
0.9284408543946542` Sin[\[Theta]] -
0.14311113535576353` Sin[2 \[Theta]] -
0.21464881411190453` Sin[3 \[Theta]]) -
0.054429237999962535` ( \!\(\*
TagBox[GridBox[{
{"\[Piecewise]", GridBox[{
{"Indeterminate",
RowBox[{"\[Theta]", "==", "0.01`"}]},
{"0",
TagBox["True",
"PiecewiseDefault",
AutoDelete->True]}
},
AllowedDimensions->{2, Automatic},
Editable->True,
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxItemSize->{
"Columns" -> {{Automatic}}, "ColumnsIndexed" -> {},
"Rows" -> {{1.}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.84]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}},
Selectable->True]}
},
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxItemSize->{
"Columns" -> {{Automatic}}, "ColumnsIndexed" -> {},
"Rows" -> {{1.}}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.35]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}}],
"Piecewise",
DeleteWithContents->True,
Editable->False,
SelectWithContents->True,
Selectable->False]\) ) (-0.495726932278196` -
0.17369695482741626` Cos[\[Theta]] +
0.8347194334290977` Cos[2 \[Theta]] -
0.16529554632348553` Cos[3 \[Theta]] +
0.0005992450328750604` Sin[\[Theta]] +
0.0011984301417462028` Sin[2 \[Theta]] +
0.0017974954086018597` Sin[3 \[Theta]]) + 2 ( \!\(\*
TagBox[GridBox[{
{"\[Piecewise]", GridBox[{
{"Indeterminate",
RowBox[{
RowBox[{
RowBox[{"-", "0.01`"}], "+", "\[Theta]"}], "==", "0"}]},
{"0",
TagBox["True",
"PiecewiseDefault",
AutoDelete->True]}
},
AllowedDimensions->{2, Automatic},
Editable->True,
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxItemSize->{
"Columns" -> {{Automatic}}, "ColumnsIndexed" -> {},
"Rows" -> {{1.}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.84]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}},
Selectable->True]}
},
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxItemSize->{
"Columns" -> {{Automatic}}, "ColumnsIndexed" -> {},
"Rows" -> {{1.}}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.35]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}}],
"Piecewise",
DeleteWithContents->True,
Editable->False,
SelectWithContents->True,
Selectable->False]\) ) (0.9284408543946542` Cos[\[Theta]] -
0.28622227071152706` Cos[2 \[Theta]] -
0.6439464423357136` Cos[3 \[Theta]] -
0.22165442361786794` Sin[\[Theta]] +
0.0866643846449908` Sin[2 \[Theta]] +
0.12463013300502895` Sin[3 \[Theta]]) -
0.10885847599992507` ( \!\(\*
TagBox[GridBox[{
{"\[Piecewise]", GridBox[{
{"Indeterminate",
RowBox[{
RowBox[{
RowBox[{"-", "0.01`"}], "+", "\[Theta]"}], "==", "0"}]},
{"0",
TagBox["True",
"PiecewiseDefault",
AutoDelete->True]}
},
AllowedDimensions->{2, Automatic},
Editable->True,
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxItemSize->{
"Columns" -> {{Automatic}}, "ColumnsIndexed" -> {},
"Rows" -> {{1.}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.84]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}},
Selectable->True]}
},
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxItemSize->{
"Columns" -> {{Automatic}}, "ColumnsIndexed" -> {},
"Rows" -> {{1.}}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.35]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}}],
"Piecewise",
DeleteWithContents->True,
Editable->False,
SelectWithContents->True,
Selectable->False]\) ) (0.0005992450328750604` Cos[\[Theta]] +
0.0023968602834924056` Cos[2 \[Theta]] +
0.005392486225805579` Cos[3 \[Theta]] +
0.17369695482741626` Sin[\[Theta]] -
1.6694388668581954` Sin[2 \[Theta]] +
0.4958866389704566` Sin[3 \[Theta]]) -
0.054429237999962535` (0.17369695482741626` Cos[\[Theta]] -
3.338877733716391` Cos[2 \[Theta]] +
1.4876599169113698` Cos[3 \[Theta]] -
0.0005992450328750604` Sin[\[Theta]] -
0.004793720566984811` Sin[2 \[Theta]] -
0.016177458677416736` Sin[
3 \[Theta]]) UnitStep[-0.01` + \[Theta]] + \
(-0.22165442361786794` Cos[\[Theta]] +
0.1733287692899816` Cos[2 \[Theta]] +
0.37389039901508686` Cos[3 \[Theta]] -
0.9284408543946542` Sin[\[Theta]] +
0.5724445414230541` Sin[2 \[Theta]] +
1.9318393270071408` Sin[
3 \[Theta]]) UnitStep[-0.01` + \[Theta]] -
0.04525014706857046` (2 ( \!\(\*
TagBox[GridBox[{
{"\[Piecewise]", GridBox[{
{"Indeterminate",
RowBox[{
RowBox[{
RowBox[{"-", "0.01`"}], "+", "\[Theta]"}], "==", "0"}]},
{"0",
TagBox["True",
"PiecewiseDefault",
AutoDelete->True]}
},
AllowedDimensions->{2, Automatic},
Editable->True,
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxItemSize->{
"Columns" -> {{Automatic}},
"ColumnsIndexed" -> {}, "Rows" -> {{1.}},
"RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.84]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}},
Selectable->True]}
},
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxItemSize->{
"Columns" -> {{Automatic}}, "ColumnsIndexed" -> {},
"Rows" -> {{1.}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.35]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}}],
"Piecewise",
DeleteWithContents->True,
Editable->False,
SelectWithContents->True,
Selectable->False]\) ) (0.002388059687027475` Cos[\[Theta]] +
0.009551761140152578` Cos[2 \[Theta]] +
0.021489671607143955` Cos[3 \[Theta]] +
0.1792378074713546` Sin[\[Theta]] +
0.32839472212704707` Sin[2 \[Theta]] -
2.5072288287504394` Sin[3 \[Theta]]) -
0.19590701566884333` ( \!\(\*
TagBox[GridBox[{
{"\[Piecewise]", GridBox[{
{"Indeterminate",
RowBox[{"\[Theta]", "==", "0.01`"}]},
{"0",
TagBox["True",
"PiecewiseDefault",
AutoDelete->True]}
},
AllowedDimensions->{2, Automatic},
Editable->True,
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxItemSize->{
"Columns" -> {{Automatic}},
"ColumnsIndexed" -> {}, "Rows" -> {{1.}},
"RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.84]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}},
Selectable->True]}
},
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxItemSize->{
"Columns" -> {{Automatic}}, "ColumnsIndexed" -> {},
"Rows" -> {{1.}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.35]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}}],
"Piecewise",
DeleteWithContents->True,
Editable->False,
SelectWithContents->True,
Selectable->False]\) ) (-0.495726932278196` -
0.17369695482741626` Cos[\[Theta]] +
0.8347194334290977` Cos[2 \[Theta]] -
0.16529554632348553` Cos[3 \[Theta]] +
0.0005992450328750604` Sin[\[Theta]] +
0.0011984301417462028` Sin[2 \[Theta]] +
0.0017974954086018597` Sin[3 \[Theta]]) + ( \!\(\*
TagBox[GridBox[{
{"\[Piecewise]", GridBox[{
{"Indeterminate",
RowBox[{"\[Theta]", "==", "0.01`"}]},
{"0",
TagBox["True",
"PiecewiseDefault",
AutoDelete->True]}
},
AllowedDimensions->{2, Automatic},
Editable->True,
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxItemSize->{
"Columns" -> {{Automatic}},
"ColumnsIndexed" -> {}, "Rows" -> {{1.}},
"RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.84]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}},
Selectable->True]}
},
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxItemSize->{
"Columns" -> {{Automatic}}, "ColumnsIndexed" -> {},
"Rows" -> {{1.}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.35]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}}],
"Piecewise",
DeleteWithContents->True,
Editable->False,
SelectWithContents->True,
Selectable->False]\) ) (-0.4923077743819351` -
0.1792378074713546` Cos[\[Theta]] -
0.16419736106352353` Cos[2 \[Theta]] +
0.8357429429168132` Cos[3 \[Theta]] +
0.002388059687027475` Sin[\[Theta]] +
0.004775880570076289` Sin[2 \[Theta]] +
0.007163223869047984` Sin[3 \[Theta]]) -
0.39181403133768666` ( \!\(\*
TagBox[GridBox[{
{"\[Piecewise]", GridBox[{
{"Indeterminate",
RowBox[{
RowBox[{
RowBox[{"-", "0.01`"}], "+", "\[Theta]"}], "==", "0"}]},
{"0",
TagBox["True",
"PiecewiseDefault",
AutoDelete->True]}
},
AllowedDimensions->{2, Automatic},
Editable->True,
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxItemSize->{
"Columns" -> {{Automatic}},
"ColumnsIndexed" -> {}, "Rows" -> {{1.}},
"RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.84]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}},
Selectable->True]}
},
GridBoxAlignment->{
"Columns" -> {{Left}}, "ColumnsIndexed" -> {},
"Rows" -> {{Baseline}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxItemSize->{
"Columns" -> {{Automatic}}, "ColumnsIndexed" -> {},
"Rows" -> {{1.}}, "RowsIndexed" -> {},
"Items" -> {}, "ItemsIndexed" -> {}},
GridBoxSpacings->{"Columns" -> {
Offset[0.27999999999999997`], {
Offset[0.35]},
Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
Offset[0.2], {
Offset[0.4]},
Offset[0.2]}, "RowsIndexed" -> {}, "Items" -> {},
"ItemsIndexed" -> {}}],
"Piecewise",
DeleteWithContents->True,
Editable->False,
SelectWithContents->True,
Selectable->False]\) ) (0.0005992450328750604` Cos[\[Theta]] +
0.0023968602834924056` Cos[2 \[Theta]] +
0.005392486225805579` Cos[3 \[Theta]] +
0.17369695482741626` Sin[\[Theta]] -
1.6694388668581954` Sin[2 \[Theta]] +
0.4958866389704566` Sin[
3 \[Theta]]) + (0.1792378074713546` Cos[\[Theta]] +
0.6567894442540941` Cos[2 \[Theta]] -
7.521686486251318` Cos[3 \[Theta]] -
0.002388059687027475` Sin[\[Theta]] -
0.019103522280305155` Sin[2 \[Theta]] -
0.06446901482143186` Sin[
3 \[Theta]]) UnitStep[-0.01` + \[Theta]] -
0.19590701566884333` (0.17369695482741626` Cos[\[Theta]] -
3.338877733716391` Cos[2 \[Theta]] +
1.4876599169113698` Cos[3 \[Theta]] -
0.0005992450328750604` Sin[\[Theta]] -
0.004793720566984811` Sin[2 \[Theta]] -
0.016177458677416736` Sin[
3 \[Theta]]) UnitStep[-0.01` + \[Theta]])) +
0.3588327668041265` ((-0.1367788536270296` +
0.22165442361786794` Cos[\[Theta]] -
0.0433321923224954` Cos[2 \[Theta]] -
0.041543377668342985` Cos[3 \[Theta]] +
0.9284408543946542` Sin[\[Theta]] -
0.14311113535576353` Sin[2 \[Theta]] -
0.21464881411190453` Sin[
3 \[Theta]]) UnitStep[-0.01` + \[Theta]] -
0.054429237999962535` (-0.495726932278196` -
0.17369695482741626` Cos[\[Theta]] +
0.8347194334290977` Cos[2 \[Theta]] -
0.16529554632348553` Cos[3 \[Theta]] +
0.0005992450328750604` Sin[\[Theta]] +
0.0011984301417462028` Sin[2 \[Theta]] +
0.0017974954086018597` Sin[
3 \[Theta]]) UnitStep[-0.01` + \[Theta]] -
0.04525014706857046` (-0.19590701566884333` \
(-0.495726932278196` - 0.17369695482741626` Cos[\[Theta]] +
0.8347194334290977` Cos[2 \[Theta]] -
0.16529554632348553` Cos[3 \[Theta]] +
0.0005992450328750604` Sin[\[Theta]] +
0.0011984301417462028` Sin[2 \[Theta]] +
0.0017974954086018597` Sin[
3 \[Theta]]) UnitStep[-0.01` + \[Theta]] + \
(-0.4923077743819351` - 0.1792378074713546` Cos[\[Theta]] -
0.16419736106352353` Cos[2 \[Theta]] +
0.8357429429168132` Cos[3 \[Theta]] +
0.002388059687027475` Sin[\[Theta]] +
0.004775880570076289` Sin[2 \[Theta]] +
0.007163223869047984` Sin[
3 \[Theta]]) UnitStep[-0.01` + \[Theta]])));
NIntegrate[ff, {\[Theta], 0.2, 0.8}]
Plot[ff, {\[Theta], 0.2, 0.8}]