Search in sources :

Example 21 with IAST

use of org.matheclipse.core.interfaces.IAST in project symja_android_library by axkr.

the class ExpandTestCase method testExpand004.

public void testExpand004() {
    IAST ast = Plus(Sow(Power(a, 2)), C1);
    IExpr temp = Algebra.expandAll(ast, null, false, false);
    if (!temp.isPresent()) {
        temp = ast;
    }
    assertEquals(temp.toString(), "1+Sow[a^2]");
}
Also used : IAST(org.matheclipse.core.interfaces.IAST) IExpr(org.matheclipse.core.interfaces.IExpr)

Example 22 with IAST

use of org.matheclipse.core.interfaces.IAST in project symja_android_library by axkr.

the class ExpandTestCase method testExpand007.

public void testExpand007() {
    // Sec(x)^2*Sin(x)^2
    IAST ast = Times(Power(Sec(x), C2), Power(Sin(x), 2));
    IExpr temp = Algebra.expand(ast, null, true, false);
    if (!temp.isPresent()) {
        assertEquals(ast.toString(), "Sec[x]^2*Sin[x]^2");
        return;
    }
    assertEquals(temp.toString(), "Tan[x]^2");
}
Also used : IAST(org.matheclipse.core.interfaces.IAST) IExpr(org.matheclipse.core.interfaces.IExpr)

Example 23 with IAST

use of org.matheclipse.core.interfaces.IAST in project symja_android_library by axkr.

the class RubiIntegrationTest method testRubi010.

public void testRubi010() {
    IAST ast;
    ast = AbortRubi(Integrate);
    // throws AbortException
    check(ast, "Abort evaluation.\n" + "");
}
Also used : IAST(org.matheclipse.core.interfaces.IAST)

Example 24 with IAST

use of org.matheclipse.core.interfaces.IAST in project symja_android_library by axkr.

the class RubiIntegrationTest method testRubi001.

public void testRubi001() {
    IAST ast;
    ast = LinearQ(Times(2, x), x);
    check(ast, "True");
    // ???
    ast = LinearQ(C2, x);
    check(ast, "False");
}
Also used : IAST(org.matheclipse.core.interfaces.IAST)

Example 25 with IAST

use of org.matheclipse.core.interfaces.IAST in project symja_android_library by axkr.

the class RubiIntegrationTest method testRubi005.

public void testRubi005() {
    IAST ast;
    // SimpFixFactor[(a_.*Complex[0,c_] + b_.*Complex[0,d_])^p_.,x_]
    ast = SimpFixFactor(Power(Plus(Times(a, Complex(C0, c)), Times(b, Complex(C0, f))), -1), x);
    check(ast, "-I/(a*c+b*f)");
    ast = SimpFixFactor(Power(Plus(Times(a, I), Times(b, Complex(C0, f))), -1), x);
    check(ast, "-I/(a+b*f)");
}
Also used : IAST(org.matheclipse.core.interfaces.IAST)

Aggregations

IAST (org.matheclipse.core.interfaces.IAST)413 IExpr (org.matheclipse.core.interfaces.IExpr)248 ISymbol (org.matheclipse.core.interfaces.ISymbol)76 IInteger (org.matheclipse.core.interfaces.IInteger)34 WrongArgumentType (org.matheclipse.core.eval.exception.WrongArgumentType)30 ISignedNumber (org.matheclipse.core.interfaces.ISignedNumber)22 ExpVector (edu.jas.poly.ExpVector)15 ArrayList (java.util.ArrayList)14 BigRational (edu.jas.arith.BigRational)13 JASIExpr (org.matheclipse.core.convert.JASIExpr)13 VariablesSet (org.matheclipse.core.convert.VariablesSet)13 INum (org.matheclipse.core.interfaces.INum)13 ExprPolynomial (org.matheclipse.core.polynomials.ExprPolynomial)12 GenPolynomial (edu.jas.poly.GenPolynomial)11 JASConversionException (org.matheclipse.core.eval.exception.JASConversionException)11 IFraction (org.matheclipse.core.interfaces.IFraction)11 INumber (org.matheclipse.core.interfaces.INumber)11 IComplex (org.matheclipse.core.interfaces.IComplex)10 ModLong (edu.jas.arith.ModLong)9 ExprPolynomialRing (org.matheclipse.core.polynomials.ExprPolynomialRing)9