1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
/*
"init.math": define common radical and transcendental field extensions.
Copyright (C) 2020, 2021 Aubrey Jaffer
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
sqrt(z): z^(1/2);
cbrt: @1^(1/3);
log(z) :: log(z)'/z'=1/z;
exp(z) :: exp(z)'/z'=exp(z);
erf(z) :: erf(z)'/z'=exp(-z^2)*2/sqrt(%pi);
fre(z) :: fre(z)'/z'=exp(z^2)*sqrt(%pi)/2;
atan(z) :: atan(z)'/z'=1/(1+z^2);
tan(z) :: tan(z)'/z'=1+tan(z)^2;
/* atanh(z) :: atanh(z)'/z'=1/(1-z^2); */
/* tanh(z) :: tanh(z)'/z'=1-tanh(z)^2; */
cot(z): 1/tan(z);
sec(z): sqrt(1+tan(z)^2);
cos(z): 1/sec(z);
sin(z): tan(z)/sec(z);
csc(z): sec(z)/tan(z);
/* acot(z): atan(1/z); */
/* asec(z): atan(sqrt(z^2-1)); */
/* acos(z): atan(sqrt(1-z^2)/z); */
/* asin(z): atan(z/sqrt(1-z^2)); */
/* acsc(z): atan(1/sqrt(z^2-1)); */
/* Lambert W function, the inverse of x*exp(x) */
W(z) :: W(z)'/z'=W(z)/(z*(1+W(z)));
/* gamma_incomplete(s,x) :: gamma_incomplete(s,x)'/x'=-x^(s-1)*exp(-x); */
/* gamma_incomplete(s,x) :: gamma_incomplete(s,x)'/x'=-exp(log(x)*(s-1))*exp(-x); */
|