hello all(adsbygoogle = window.adsbygoogle || []).push({});

well I wanted to write a mathematica program so i can be able to experiment but for some reason i cant get it to work, does anybody have any ideas on where im going wrong, below is something that i have cut out of my mathematica program, all you have to do is cut and paste into mathematica

please help

thank you

\!\(\(LowerRiemann[a0_, b0_,

n0_] := \[IndentingNewLine]Module[{a = a0, b = b0, n = n0,

X}, \[IndentingNewLine]\[IndentingNewLine]X\_i_ =

a + i\ \(b - a\)\/n\ ; \ \[IndentingNewLine]sum =

0; \[IndentingNewLine]For[\[IndentingNewLine]i = 1,

i <= n, \(i++\), \[IndentingNewLine]Xv =

Select[Xvals,

X\_\(i - 1\) <= #1 <= X\_i\ &]; \[IndentingNewLine]Ymin = \

Min[f[Xv]]; \ \[IndentingNewLine]sum =

sum + Ymin\ \(b - a\)\/n;\ \ \[IndentingNewLine]]; \ \

\[IndentingNewLine]Return[\ \ sum\ ];\ ];\)\ \[IndentingNewLine]

\(f[x_] = x\^2;\)\[IndentingNewLine]

\(a = 0;\)\[IndentingNewLine]

b = 1; \[IndentingNewLine]

\(n = 25;\)\[IndentingNewLine]

LowerRiemann[a, b, n]\)

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Wanted to write a mathematica program

Loading...

Similar Threads for Wanted write mathematica | Date |
---|---|

LaTeX Bold Writing in Latex | Apr 16, 2017 |

Want gray scale image of a matrix in matlab | Aug 14, 2015 |

LaTeX Just opened a blog and want to LaTex it. Help? | Dec 8, 2014 |

Wanting program or app for waveform analysis | Jan 18, 2014 |

Matlab - I want to create row matrix | Apr 20, 2012 |

**Physics Forums - The Fusion of Science and Community**