public Generic selfElementary() { return new Exp( parameters[0] ).selfElementary().subtract( new Exp( parameters[0].negate() ).selfElementary() ).multiply(Constants.Generic.HALF); }
public Generic selfElementary() { return selfExpand(); }
public Generic selfExpand() { if (parameters[0].signum() < 0) { return new Inverse(new Exp(parameters[0].negate()).selfExpand()).selfExpand(); } else if (parameters[0].signum() == 0) { return JsclInteger.valueOf(1); } return expressionValue(); }
public Generic selfSimplify() { return new Inverse(new Exp(parameters[0].negate()).selfSimplify()).selfSimplify(); } else if (parameters[0].signum() == 0) { return JsclInteger.valueOf(1); Generic result = JsclInteger.valueOf(1); for (Generic sumElement : sumElements) { result = result.multiply(new Exp(sumElement).selfSimplify()); if (n[0].compareTo(JsclInteger.valueOf(1)) == 0 && n[1].compareTo(JsclInteger.valueOf(1)) == 0) ; else return new Pow( new Exp(n[2]).selfSimplify(), new Fraction(n[0], n[1]).selfSimplify() ).selfSimplify(); return expressionValue();
return g[0]; } else if (v instanceof Exp) { Generic g[] = ((Exp) v).getParameters(); return new Exp(new Conjugate(g[0]).selfSimplify()).selfSimplify(); } else if (v instanceof Ln) { Generic g[] = ((Ln) v).getParameters();
void bodyToMathML(MathML element, boolean fenced) { if (fenced) { MathML e1 = element.element("mfenced"); bodyToMathML(e1); element.appendChild(e1); } else { bodyToMathML(element); } }
@Nonnull public Variable newInstance() { return new Exp(null); } }
public Generic antiDerivative(@Nonnull Variable variable) throws NotIntegrableException { Generic s = parameters[0]; if (s.isPolynomial(variable)) { Polynomial p = Polynomial.factory(variable).valueOf(s); if (p.degree() == 1) { Generic a[] = p.elements(); return new Inverse(a[1]).selfExpand().multiply(antiDerivative(0)); } else throw new NotIntegrableException(this); } else throw new NotIntegrableException(this); }
public void toMathML(MathML element, Object data) { int exponent = data instanceof Integer ? ((Integer) data).intValue() : 1; if (exponent == 1) bodyToMathML(element, false); else { MathML e1 = element.element("msup"); bodyToMathML(e1, true); MathML e2 = element.element("mn"); e2.appendChild(element.text(String.valueOf(exponent))); e1.appendChild(e2); element.appendChild(e1); } }
public Generic selfElementary() { return new Exp( parameters[0] ).selfElementary().add( new Exp( parameters[0].negate() ).selfElementary() ).multiply(Constants.Generic.HALF); }
public Generic antiDerivative(int n) throws NotIntegrableException { return selfExpand(); }
public Generic selfElementary() { return new Exp( Constants.Generic.I.multiply(parameters[0]) ).selfElementary().add( new Exp( Constants.Generic.I.multiply(parameters[0].negate()) ).selfElementary() ).multiply(Constants.Generic.HALF); }
public Generic derivative(int n) { return selfExpand(); }
public Generic selfElementary() { final Generic power = I.multiply(parameters[0]); final Generic e = new Exp(power).selfElementary().subtract(new Exp(I.multiply(parameters[0].negate())).selfElementary()).multiply(I.negate().multiply(HALF)); return e; }
public Generic selfElementary() { return new Exp( new Ln( parameters[0] ).selfElementary().multiply( parameters[1] ) ).selfElementary(); }