Hi Neven,
as a general remark, I suggest to you that you make simpler expressions.
Then you have better chances to find the problem, see attachment.
Maybe the two lines
error "ENDE"
)fin
in that file may help you in the future to nail down where exactly the
error is.
As you have seen, I have split up the expressions into simpler pieces
and added the respective type information.
But when it comes to
I1: TAY(eps) := integrate(t, sigma)
I must stop, because I have also other things to do and do not know an
easy solution for it. Maybe, since t is a Taylor series over EXPR, you
can simply first truncate and after that integrate wrt. sigma.
I hope, with that bit of code you may be able to continue yourself.
Good luck.
Ralf
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/68fa2537-4ce4-4148-61ed-2782b197cbb9%40hemmecke.org.
)abbrev package GGLC GeographicLibCoefficients
GeographicLibCoefficients() : Exports == Implementation where
L ==> List
I ==> Integer
P ==> PositiveInteger
EXPR ==> Expression(I)
E ==> EXPR
RAT ==> Fraction(I)
PLY ==> Polynomial(RAT)
UPLY(var) ==> UnivariatePolynomial(var, RAT)
RATFUNC ==> Fraction(PLY)
TAY(var) ==> UnivariateTaylorSeries(EXPR, var, 0)
Exports ==> with
tau1_m_sigma: () -> EXPR
Implementation ==> add
maxpow(): P == 8
expr x ==> x :: Symbol :: EXPR
tau1_m_sigma(): EXPR ==
sigma: E := expr "sigma"
k2: E := expr "k2"
eps: E := expr "eps"
e1: E := sqrt(1 + k2 * sin(sigma)^2)
e2: E := subst(e1, k2 = 4 * eps / (1 - eps)^2) * (1 - eps)
anyt := taylor(e2, eps=0)$ExpressionToUnivariatePowerSeries(I,E)
t: TAY(eps) := retract(t)$AnyFunctions1(TAY(eps))
I1: TAY(eps) := integrate(t, sigma)
error "ENDE"
)fin
It: E := reduce(_+, [coefficient(I1, n) * eps^n for n in 0..maxpow()])
A1: UPLY('eps) := simplify(subst(I1_truncated, 'sigma = 2*%pi) / (2*%pi))
tau1: EXPR := I1_truncated / A1
tau1 - sigma