Sharedsupport / 2015-03-11-093745-axiom-integral.sagewsOpen in CoCalc
Authors: Harald Schilly, ℏal Snyder, William A. Stein
License: GNU General Public License v3.0
Description: Examples for support purposes.

Based on http://axiom-wiki.newsynthesis.org/ExampleIntegration

%axiom f := x/(x^3-x+1)
x ---------- 3 x - x + 1 Type: Fraction(Polynomial(Integer))
%axiom )set output tex off
be09b8c4-14ce-4aae-9c70-51aeeadde3ef %axiom )set output algebra on i := integrate(f, x)
+-----------+ +-----------+ +--+ +--+ | 2 | 2 (9\|23 %%F0 + \|23 )\|69%%F0 + 4 +--+ 2 +--+ 2 2 - 2\|69%%F0 + 4 atan(----------------------------------) + 2\|23 %%F0 log(207%%F0 - 23%%F0 + 25x + 6) - \|23 %%F0 log((- 207x + 46)%%F0 + (23x - 69)%%F0 + 25x - 6x - 7) 2 207%%F0 - 23%%F0 - 50x + 6 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- +--+ 2\|23 Type: Union(Expression(Integer),...)
%axiom )set output tex on )set output algebra off
%axiom D(i, x)
$ frac{x}{{{x^3} -x+1}} leqno(13) $ Type: Expression(Integer)
show(axiom('D(i,x)'))
xx3x+1\displaystyle \frac{x}{{{x^3} -x+1}}
show(axiom('ks := kernels i'))
tan1((9 23 %%F0+23) 69 %%F02+4207 %%F0223 %%F050 x+6) 69 %%F02+4 log(207 %%F0223 %%F0+25 x+6) log((207 x+46) %%F02+(23 x69) %%F0+25 x26 x7) %%F0 23\displaystyle {\tan^{-1} \left( {{ \frac{{{\left( {9 \ {\sqrt {{23}}} \ \%\%F0}+{\sqrt {{23}}} \right)} \ {\sqrt {{{{69} \ { \%\%F0^2}}+4}}}}}{{{{207} \ { \%\%F0^2}} -{{23} \ \%\%F0} -{{50} \ x}+6}}}} \right)} \ {\sqrt {{{{69} \ { \%\%F0^2}}+4}}} \ {\log \left( {{{{207} \ { \%\%F0^2}} -{{23} \ \%\%F0}+{{25} \ x}+6}} \right)} \ {\log \left( {{{{\left( -{{207} \ x}+{46} \right)} \ { \%\%F0^2}}+{{\left( {{23} \ x} -{69} \right)} \ \%\%F0}+{{25} \ {x^2}} -{6 \ x} -7}} \right)} \ \%\%F0 \ {\sqrt {{23}}}
show(axiom("[definingPolynomial(k::Expression(Integer)) for k in ks | name operator k = 'rootOf]"))
23 %%F03+%%F0+123\displaystyle { \frac{{{{23} \ { \%\%F0^3}}+ \%\%F0+1}}{{23}}}
show(axiom("definingPolynomial(%%F0)"))
23 %%F03+%%F0+123\displaystyle \frac{{{{23} \ { \%\%F0^3}}+ \%\%F0+1}}{{23}}
show(axiom("s:=radicalSolve(definingPolynomial(%%F0)::Fraction Polynomial Integer)"))
show(axiom("i0 := integrate(f, x=1..2)"))
4 69 %%O02+4 tan1((9 23 %%O0+23) 69 %%O02+4207 %%O0223 %%O094)+4 69 %%O02+4 tan1((9 23 %%O0+23) 69 %%O02+4207 %%O0223 %%O044)+2 23 %%O0 log(21850 %%O024025 %%O0+3550)2 23 %%O0 log(11500 %%O022875 %%O0+1375)+23 %%O0 log(2875 %%O022875 %%O0500)23 %%O0 log(64975 %%O0210350 %%O0+5825)4 23\displaystyle \frac{{-{4 \ {\sqrt {{{{69} \ { \%\%O0^2}}+4}}} \ {\tan^{-1} \left( {{ \frac{{{\left( {9 \ {\sqrt {{23}}} \ \%\%O0}+{\sqrt {{23}}} \right)} \ {\sqrt {{{{69} \ { \%\%O0^2}}+4}}}}}{{{{207} \ { \%\%O0^2}} -{{23} \ \%\%O0} -{94}}}}} \right)}}+{4 \ {\sqrt {{{{69} \ { \%\%O0^2}}+4}}} \ {\tan^{-1} \left( {{ \frac{{{\left( {9 \ {\sqrt {{23}}} \ \%\%O0}+{\sqrt {{23}}} \right)} \ {\sqrt {{{{69} \ { \%\%O0^2}}+4}}}}}{{{{207} \ { \%\%O0^2}} -{{23} \ \%\%O0} -{44}}}}} \right)}}+{2 \ {\sqrt {{23}}} \ \%\%O0 \ {\log \left( {{{{21850} \ { \%\%O0^2}} -{{4025} \ \%\%O0}+{3550}}} \right)}} -{2 \ {\sqrt {{23}}} \ \%\%O0 \ {\log \left( {{{{11500} \ { \%\%O0^2}} -{{2875} \ \%\%O0}+{1375}}} \right)}}+{{\sqrt {{23}}} \ \%\%O0 \ {\log \left( {{-{{2875} \ { \%\%O0^2}} -{{2875} \ \%\%O0} -{500}}} \right)}} -{{\sqrt {{23}}} \ \%\%O0 \ {\log \left( {{-{{64975} \ { \%\%O0^2}} -{{10350} \ \%\%O0}+{5825}}} \right)}}}}{{4 \ {\sqrt {{23}}}}}
show(axiom("eval(i0,%%F0=rhs(s(1)));"))
4 69 %%O02+4 tan1((9 23 %%O0+23) 69 %%O02+4207 %%O0223 %%O094)+4 69 %%O02+4 tan1((9 23 %%O0+23) 69 %%O02+4207 %%O0223 %%O044)+2 23 %%O0 log(21850 %%O024025 %%O0+3550)2 23 %%O0 log(11500 %%O022875 %%O0+1375)+23 %%O0 log(2875 %%O022875 %%O0500)23 %%O0 log(64975 %%O0210350 %%O0+5825)4 23\displaystyle \frac{{-{4 \ {\sqrt {{{{69} \ { \%\%O0^2}}+4}}} \ {\tan^{-1} \left( {{ \frac{{{\left( {9 \ {\sqrt {{23}}} \ \%\%O0}+{\sqrt {{23}}} \right)} \ {\sqrt {{{{69} \ { \%\%O0^2}}+4}}}}}{{{{207} \ { \%\%O0^2}} -{{23} \ \%\%O0} -{94}}}}} \right)}}+{4 \ {\sqrt {{{{69} \ { \%\%O0^2}}+4}}} \ {\tan^{-1} \left( {{ \frac{{{\left( {9 \ {\sqrt {{23}}} \ \%\%O0}+{\sqrt {{23}}} \right)} \ {\sqrt {{{{69} \ { \%\%O0^2}}+4}}}}}{{{{207} \ { \%\%O0^2}} -{{23} \ \%\%O0} -{44}}}}} \right)}}+{2 \ {\sqrt {{23}}} \ \%\%O0 \ {\log \left( {{{{21850} \ { \%\%O0^2}} -{{4025} \ \%\%O0}+{3550}}} \right)}} -{2 \ {\sqrt {{23}}} \ \%\%O0 \ {\log \left( {{{{11500} \ { \%\%O0^2}} -{{2875} \ \%\%O0}+{1375}}} \right)}}+{{\sqrt {{23}}} \ \%\%O0 \ {\log \left( {{-{{2875} \ { \%\%O0^2}} -{{2875} \ \%\%O0} -{500}}} \right)}} -{{\sqrt {{23}}} \ \%\%O0 \ {\log \left( {{-{{64975} \ { \%\%O0^2}} -{{10350} \ \%\%O0}+{5825}}} \right)}}}}{{4 \ {\sqrt {{23}}}}}
%axiom )set output algebra on )set output tex off
axiom("eval(i0,%%F0=rhs(s(1)));")
+-----------+ +-----------+ +-----------+ +--+ +--+ | 2 +-----------+ +--+ +--+ | 2 | 2 (9\|23 %%O0 + \|23 )\|69%%O0 + 4 | 2 (9\|23 %%O0 + \|23 )\|69%%O0 + 4 +--+ 2 +--+ 2 - 4\|69%%O0 + 4 atan(----------------------------------) + 4\|69%%O0 + 4 atan(----------------------------------) + 2\|23 %%O0 log(21850%%O0 - 4025%%O0 + 3550) - 2\|23 %%O0 log(11500%%O0 - 2875%%O0 + 1375) 2 2 207%%O0 - 23%%O0 - 94 207%%O0 - 23%%O0 - 44 + +--+ 2 +--+ 2 \|23 %%O0 log(- 2875%%O0 - 2875%%O0 - 500) - \|23 %%O0 log(- 64975%%O0 - 10350%%O0 + 5825) / +--+ 4\|23
axiom("definingPolynomial(%%O0)")
3 23%%O0 + %%O0 + 1 ------------------ 23