Let's suppose that for the following expression:
$\qquad \alpha\,\beta +\alpha+\beta$
I know that $\alpha$ and $\beta$ are of small magnitude (e.g., 0 < $\alpha$ < 0.02 and 0 < $\beta$ < 0.02). Therefore, the magnitude of $\alpha\,\beta$ is negligible, i.e., the original expression can be approximated by
$\qquad \alpha+\beta$
Is there any command in Mathematica to do such an operation?
Reminder from original question: if and $\alpha$ and $\beta$ are of small magnitude, we may approximate the original equation by disregarding nonlinear terms, such as $\alpha^n$, $\beta^n$,n=2,3,..., and $\alpha\beta$
My observation is that by applying the good code suggestion of @Henrik Schumacher in a fraction it seems to not generate a proper result to the whole fraction. For instance,if
$\text{numerator}=\alpha \beta +\alpha +\beta ^2+\beta -\lambda \epsilon q(t)+\text{$\beta $q}(t)$
numerator = α*β + β^2 + α + β + β q[t] - ϵ*λ*q[t]
f = numerator;
(f /. {α -> 0, β -> 0}) + (D[f, {{α, β}, 1}] /. {α -> 0, β -> 0}) . {α, β}
The code generates the correct elimination on numerator :$\alpha +\beta -\lambda \epsilon q(t)+\text{$\beta $q}(t)$
and
$\text{denominator}=\alpha +\alpha (-\beta ) \text{LD}(t)+\alpha \beta q(t)+\beta q(t)+\epsilon +1$:
denominator= 1 +α +ϵ -α*β*LD[t] +β*q[t] +α*β*q[t]
f = denominator;
(f /. {α -> 0, β -> 0}) + (D[f, {{α, β}, 1}] /. {α -> 0, β -> 0}) . {α, β}
The code generates the correct elimination on denominator: $\alpha +\beta q(t)+\epsilon +1$
Nevertheless, when applying the suggested first order Taylor Series expansion in the fraction as a whole:
f = (numerator /denominator);
(f /. {α -> 0, β -> 0}) + (D[
f, {{α, β}, 1}] /. {α -> 0, β ->
0}).{α, β} // Simplify
The result generated is incorrect. $\frac{(\epsilon +1) (\alpha +\beta )-q(t) (\lambda \epsilon (-\alpha +\epsilon +1)+\beta \text{$\beta $q}(t))+\beta \lambda \epsilon q(t)^2+(-\alpha +\epsilon +1) \text{$\beta $q}(t)}{(\epsilon +1)^2}$
That can be observed by, for instant, noticing that in the output above (i) the numerator has $\beta^2$, (ii) the code generated $q[t]^2$ that did not exist in the original equation.
I hope that this time I could express my concern in a proper format. Thank you all for your support!
Questions related to @Akku14's code suggestion
Question 1: @Akku14, I was trying to use your code suggestion with the slight modification in the original purpose(instead of eliminating α and β, now eliminating α, β and LD[t]), but I had no success. I think the reason is because I could not find a way of writing LD[t] as a parameter of function g:
for the following equation:
\[CapitalDelta]p[t] = (α*β + β^2 + α + β + β*q[t] - ϵ*λ*q[t])/(1 + α + ϵ -α*LD[t] + β*q[t] + α*β*q[t])
$\text{$\Delta $p}(t)=\frac{\alpha \beta +\alpha +\beta ^2+\beta +\beta q(t)-\lambda \epsilon q(t)}{\alpha +\alpha (-\text{LD}(t))+\alpha \beta q(t)+\beta q(t)+\epsilon +1}$
g[α_, β_, LD[t] _] = \[CapitalDelta]p[t]
By using @Akku14's suggestion:
ser = (Series[g[α eps, β eps, LD[t] eps], {eps, 0, 1}] //
Normal) /. eps -> 1 // Simplify
I get the following output:
$\frac{(\epsilon +1) (\alpha +\beta )+q(t) (\lambda \epsilon (\alpha -\epsilon -1)+\beta (\epsilon +1)-\alpha \lambda \epsilon LD[t]+\beta \lambda \epsilon q(t)^2}{(\epsilon +1)^2}$
which is incorrect since $\alpha \lambda \epsilon LD[t]$ is present in the numerator of ser
.
Again, I think that the problem is that my g
is not recognizing LD[t] as a parameter; would any of you know how to approach this issue?
Question 2.1: in case I wanted second order Taylor Series for g[α, β, LD[t]]
, changing {eps, 0, 1}
to {eps, 0, 2}
at ser
would be enough to get the correct result? Like:
ser = (Series[g[α eps, β eps, LD[t] eps], {eps, 0, 2}] //
Normal) /. eps -> 1 // Simplify
Question 2.2: in case I wanted n order Taylor Series for g[α, β, LD[t]]
, changing {eps, 0, 1}
to {eps, 0, n}
at ser
would be enough to get the correct result?
β
andq[t]
in the definition of the numerator. Inserting it should fix everything. $\endgroup$