login  home  contents  what's new  discussion  bug reports     help  links  subscribe  changes  refresh  edit

Edit detail for SandBoxSymbolicSumsAndProducts revision 1 of 2

1 2
Editor: Bill Page
Time: 2009/10/16 19:38:19 GMT-7
Note: split

changed:
-
Symbolic evaluation of sums and products

\begin{axiom}
sum(i, i=1..n)
product(x+k, k=0..n-1)
\end{axiom}


Result should be pi

\begin{axiom}
integrate((4*sqrt(1/2)-8*x^3-4*sqrt(1/2)*x^4-8*x^5)/(1-x^8), x=0..sqrt(1/2))
\end{axiom}


Use "noPole"

Axioms answer is "potentialPole", which indicates that there *might* be a pole within the interval of integration. If you are sure, that there is no pole within this interval, use "noPole":

\begin{axiom}
integrate((4*sqrt(1/2)-8*x^3-4*sqrt(1/2)*x^4-8*x^5)/(1-x^8), x=0..sqrt(1/2), "noPole") 
\end{axiom}

It's numeric value is roughly
\begin{axiom}
numeric %
\end{axiom}

To check, do a numeric integration:
\begin{axiom}
romberg(x+->(4*sqrt(1/2)-8*x^3-4*sqrt(1/2)*x^4-8*x^5)/(1-x^8),0.0,sqrt(1/2)::Float,0.1,0.1,6,10)
\end{axiom}


Symbolic evaluation of sums and products

fricas
(1) -> sum(i, i=1..n)

\label{eq1}\frac{{{n}^{2}}+ n}{2}(1)
Type: Fraction(Polynomial(Integer))
fricas
product(x+k, k=0..n-1)

\label{eq2}\prod_{
\displaystyle
{k = 0}}^{
\displaystyle
{n - 1}}{\left(x + k \right)}(2)
Type: Expression(Integer)

Result should be pi

fricas
integrate((4*sqrt(1/2)-8*x^3-4*sqrt(1/2)*x^4-8*x^5)/(1-x^8), x=0..sqrt(1/2))

\label{eq3}\verb#"potentialPole"#(3)
Type: Union(pole: potentialPole,...)

Use "noPole"

Axioms answer is "potentialPole", which indicates that there might be a pole within the interval of integration. If you are sure, that there is no pole within this interval, use "noPole":

fricas
integrate((4*sqrt(1/2)-8*x^3-4*sqrt(1/2)*x^4-8*x^5)/(1-x^8), x=0..sqrt(1/2), "noPole")

\label{eq4}-{{\frac{1}{2}}\ {\log \left({\frac{5}{2}}\right)}}+{{\frac{1}{4}}\ {\log \left({\frac{1}{4}}\right)}}-{\arctan \left({2}\right)}+ \pi(4)
Type: Union(f1: OrderedCompletion?(Expression(AlgebraicNumber?)),...)

It's numeric value is roughly

fricas
numeric %
There are 4 exposed and 0 unexposed library operations named numeric having 1 argument(s) but none was determined to be applicable. Use HyperDoc Browse, or issue )display op numeric to learn more about the available operations. Perhaps package-calling the operation or using coercions on the arguments will allow you to apply the operation.
Cannot find a definition or applicable library operation named numeric with argument type(s) Union(f1: OrderedCompletion(Expression(AlgebraicNumber)),f2: List(OrderedCompletion(Expression(AlgebraicNumber))),fail: failed,pole: potentialPole)
Perhaps you should use "@" to indicate the required return type, or "$" to specify which version of the function you need.

To check, do a numeric integration:

fricas
romberg(x+->(4*sqrt(1/2)-8*x^3-4*sqrt(1/2)*x^4-8*x^5)/(1-x^8),0.0,sqrt(1/2)::Float,0.1,0.1,6,10)

\label{eq5}\begin{array}{@{}l}
\displaystyle
\left[{value ={1.2297249795 \_ 786311161}}, \: \right.
\
\
\displaystyle
\left.{error ={0.251271954 E - 10}}, \:{totalpts ={129}}, \:{success =  \mbox{\rm true} }\right] 
(5)
Type: Record(value: Float,error: Float,totalpts: Integer,success: Boolean)