Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18385,7 +18385,8 @@ private static (Entity Logarithm, Entity Degree, Entity Offset, Entity Slope)? T

/// <summary>
/// Whether <paramref name="factor"/> is a power that is not whole of something holding a logarithm of something in
/// <paramref name="x"/>, or an exponential of something in <paramref name="x"/> that is not linear in it.
/// <paramref name="x"/>, an exponential of something in <paramref name="x"/> that is not linear in it, or holds a
/// sine or a cosine of one.
/// </summary>
private static bool IsATranscendentalPowerOfSomethingInX(Entity factor, Entity.Variable x) => factor switch
{
Expand All @@ -18394,8 +18395,13 @@ private static (Entity Logarithm, Entity Degree, Entity Offset, Entity Slope)? T
=> exponent.Nodes.Any(node => node is Sumf or Minusf && node.ContainsNode(x))
&& !TreeAnalyzer.TryGetPolyLinear(exponent, x, out _, out _),
Powf(var @base, var exponent) when !exponent.ContainsNode(x) && exponent is not Number.Integer
=> @base.Nodes.Any(node => node is Logf(_, var antilogarithm) && antilogarithm.ContainsNode(x)),
_ => false
&& @base.Nodes.Any(node => node is Logf(_, var antilogarithm) && antilogarithm.ContainsNode(x)) => true,
// A sine or a cosine of a sum in x that is not linear, in whatever holds it: x sin(a + b (c + d x)^3), and
// x (a + b sin(c + d (f + g x)^n))^2, which in u are powers of u beside the sine of a power of u, Euler's
// formula's exponentials. Rubi's 4.1.12.
_ => factor.Nodes.Any(node => node is Sinf or Cosf && node.DirectChildren.First() is var argument && argument.ContainsNode(x)
&& argument.Nodes.Any(inner => inner is Sumf or Minusf && inner.ContainsNode(x))
&& !TreeAnalyzer.TryGetPolyLinear(argument, x, out _, out _))
};

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,19 @@ public void APositiveRateIsTakenOutOfThePower()

/// <summary>
/// A polynomial beside a symbolic power of a logarithm of one shifted linear, or an exponential of a power of one,
/// written in <c>u = a + b x</c>, where each term is a gamma function. The constant in front comes along. Rubi's 3.3,
/// 3.4 and 2.3.
/// written in <c>u = a + b x</c>, where each term is a gamma function. The constant in front comes along. And beside
/// a sine or a cosine of a power of one, which in u is Euler's formula's exponentials of a power of u. Rubi's 3.3,
/// 3.4, 2.3 and 4.1.12.
/// </summary>
[Theory]
[InlineData("2*x*(a + b*ln(c*(d + f*x)))^n")]
[InlineData("x*(a + b*ln(c*(d + f*sqrt(x))))^n")]
[InlineData("x^2*f^(c*(a + b*x)^3)")]
[InlineData("(a + b*x)^2*e^(-c*(d + f*x)^3)")]
[InlineData("(a + f*x)*sin(b + c*(d + f*x)^3)")]
[InlineData("x*sin(a + b*(c + d*x)^n)")]
[InlineData("x^2*cos(a + b/(c + d*x)^3)")]
[InlineData("x*(a + b*sin(c + d*(f + x)^n))^2")]
public void APolynomialBesideAFunctionOfAShiftedLinear(string integrand) => DifferentiatesBack(integrand);

/// <summary>
Expand Down
Loading