Open andrew-murdza opened 3 months ago
Implement these simplification rules
Base of Infinity
{match:'\infty^a',replace:'\infty',condition:'a>0'}
{match:'\infty^a',replace:'0',condition:'a<0'}
{match:'(-\infty)^a',replace:'0',condition:'a<0'}
{match:'(-\infty)^n',replace:'\infty',condition:'a is a even integer'}
{match:'(-\infty)^{n/m}',replace:'\infty',condition:'n is an even integer and m is an odd integer'}
{match:'(-\infty)^n',replace:'-\infty',condition:'a is an odd integer'}
{match:'(-\infty)^{n/m}',replace:'\infty',condition:'n is an odd integer and m is an odd integer'}
Power of Infinity
{match:a^\infty,replace:'\infty',condition:'a>1'}
{match:a^\infty,replace:'0',condition:'0<a<1'}
{match:a^{-\infty},replace:'0',condition:'a>1'}
{match:a^{-\infty},replace:'\infty',condition:'0<a<1'}
\exp(\infty)->\infty
\exp(-\infty)->0
Log of Infinity
\log(\infty)->\infty
\ln(\infty)->\infty
Trig functions
\sin(\infty)->NaN
\cos(\infty)->NaN
\tan(\infty)->NaN
\cot(\infty)->NaN
\sec(\infty)->NaN
\csc(\infty)->NaN
\sin(-\infty)->NaN
\cos(-\infty)->NaN
\tan(-\infty)->NaN
\cot(-\infty)->NaN
\sec(-\infty)->NaN
\csc(-\infty)->NaN
Inverse Trig Functions
\arcsin(\infty)->NaN
\arccos(\infty)->NaN
\arcsin(-\infty)->NaN
\arccos(-\infty)->NaN
\arctan(\infty)->\frac{\pi}{2}
\arctan(-\infty)->-\frac{\pi}{2}
\arccot(\infty)->0
\arccot(-\infty)->\pi
\arcsec(\infty)->\frac{\pi}{2}
\arcsec(-\infty)->\frac{\pi}{2}
\arccsc(\infty)->0
\arccsc(-\infty)->0
Hyperbolic Trig Functions
\sinh(\infty)->\infty
\sinh(-\infty)->-\infty
\cosh(\infty)->\infty
\cosh(-\infty)->\infty
\tanh(\infty)->1
\tanh(-\infty)->-1
\coth(\infty)->1
\coth(-\infty)->-1
\sech(\infty)->0
\sech(-\infty)->0
\csch(\infty)->0
\csch(-\infty)->0
Inverse of Hyperbolic Trig Functions
\arcsinh(\infty)->\infty
\arcsinh(-\infty)->-\infty
\arccosh(\infty)->\infty
\arccosh(-\infty)->NaN
\arctanh(\infty)->NaN
\arctanh(-\infty)->NaN
\arccoth(\infty)->NaN
\arccoth(-\infty)->NaN
\arcsech(\infty)->NaN
\arcsech(-\infty)->NaN
\arccsch(\infty)->0
\arccsch(-\infty)->0
Implement these simplification rules
Base of Infinity
{match:'\infty^a',replace:'\infty',condition:'a>0'}
{match:'\infty^a',replace:'0',condition:'a<0'}
{match:'(-\infty)^a',replace:'0',condition:'a<0'}
{match:'(-\infty)^n',replace:'\infty',condition:'a is a even integer'}
{match:'(-\infty)^{n/m}',replace:'\infty',condition:'n is an even integer and m is an odd integer'}
{match:'(-\infty)^n',replace:'-\infty',condition:'a is an odd integer'}
{match:'(-\infty)^{n/m}',replace:'\infty',condition:'n is an odd integer and m is an odd integer'}
Power of Infinity
{match:a^\infty,replace:'\infty',condition:'a>1'}
{match:a^\infty,replace:'0',condition:'0<a<1'}
{match:a^{-\infty},replace:'0',condition:'a>1'}
{match:a^{-\infty},replace:'\infty',condition:'0<a<1'}
\exp(\infty)->\infty
\exp(-\infty)->0
Log of Infinity
\log(\infty)->\infty
\ln(\infty)->\infty
Trig functions
\sin(\infty)->NaN
\cos(\infty)->NaN
\tan(\infty)->NaN
\cot(\infty)->NaN
\sec(\infty)->NaN
\csc(\infty)->NaN
\sin(-\infty)->NaN
\cos(-\infty)->NaN
\tan(-\infty)->NaN
\cot(-\infty)->NaN
\sec(-\infty)->NaN
\csc(-\infty)->NaN
Inverse Trig Functions
\arcsin(\infty)->NaN
\arccos(\infty)->NaN
\arcsin(-\infty)->NaN
\arccos(-\infty)->NaN
\arctan(\infty)->\frac{\pi}{2}
\arctan(-\infty)->-\frac{\pi}{2}
\arccot(\infty)->0
\arccot(-\infty)->\pi
\arcsec(\infty)->\frac{\pi}{2}
\arcsec(-\infty)->\frac{\pi}{2}
\arccsc(\infty)->0
\arccsc(-\infty)->0
Hyperbolic Trig Functions
\sinh(\infty)->\infty
\sinh(-\infty)->-\infty
\cosh(\infty)->\infty
\cosh(-\infty)->\infty
\tanh(\infty)->1
\tanh(-\infty)->-1
\coth(\infty)->1
\coth(-\infty)->-1
\sech(\infty)->0
\sech(-\infty)->0
\csch(\infty)->0
\csch(-\infty)->0
Inverse of Hyperbolic Trig Functions
\arcsinh(\infty)->\infty
\arcsinh(-\infty)->-\infty
\arccosh(\infty)->\infty
\arccosh(-\infty)->NaN
\arctanh(\infty)->NaN
\arctanh(-\infty)->NaN
\arccoth(\infty)->NaN
\arccoth(-\infty)->NaN
\arcsech(\infty)->NaN
\arcsech(-\infty)->NaN
\arccsch(\infty)->0
\arccsch(-\infty)->0