3
$\begingroup$

I have an expression for E_y in terms of various s terms, and I want to perform a series expansion based on the assumption that cross terms (like s12) are much smaller than the diagonal terms (like s33).

An example of an expression I am working with is: $ E_y = \frac{E_x (s13 s23 - s12 s33)}{-s23^2 + s22 s33} $

My goal is to expand this expression in a series where the cross terms (s12, s13, s23) are considered small compared to the diagonal terms (s22, s33).

Here is my attempt using the Series function in Mathematica:

(* Define the expression for Ey *)
expr = (Ex (s13 s23 - s12 s33))/(-s23^2 + s22 s33);

(* Perform the series expansion *)
expandedExpr = Series[
  expr, 
  {s12, 0, 1}, 
  {s13, 0, 1}, 
  {s23, 0, 1}
];

(* Simplify the resulting series *)
simplifiedExpr = Normal[expandedExpr] // Simplify;

(* Output the simplified expanded expression *)
simplifiedExpr

However, this approach does not correctly recognize that terms like s12 s23 are smaller compared to terms like s12 s33. The Series function expands each term independently, but I need a way to account for the relative smallness of the cross terms in the expansion.

Question

How can I properly perform a series expansion in Mathematica that takes into account the fact that cross terms (s12, s13, s23) are much smaller compared to diagonal terms (s22, s33)?

$\endgroup$

3 Answers 3

5
$\begingroup$

Let us introduce an extra (small) parameter t and rescale the cross-term parameters by the factor of t:

expr=(Ex (s13 s23-s12 s33))/(-s23^2+s22 s33);
crossterms={s13,s23,s12};
rescaling=(#->t #)&/@crossterms

(* {s13->s13 t,s23->s23 t,s12->s12 t} *)

Series[expr/.rescaling,{t,0,4}]

series in t

You can use SeriesCoefficient to pick coefficients.

$\endgroup$
3
$\begingroup$

Similar to @A.Kato's solution but with auto-discovery of variables:

expr = (Ex (s13 s23 - s12 s33))/(-s23^2 + s22 s33);

Look for diagonal variables:

diag = Select[Variables[expr], StringMatchQ[ToString[#],
       "s" ~~ x : DigitCharacter ~~ x : DigitCharacter] &]
(*    {s33, s22}    *)

Substitute a scaling factor:

rescaling = (# -> t #) & /@ diag
(*    {s33 -> s33 t, s22 -> s22 t}    *)

Series-expand for large $t$:

Series[expr /. rescaling, {t, ∞, 3}]

enter image description here

$\endgroup$
2
$\begingroup$

You can use the resource function MultivariateTaylorPolynomial with the "Weights" option. Variables with larger weights get removed at lower degrees.

Example:

expr = (Ex (s13 s23 - s12 s33))/(-s23^2 + s22 s33);
ResourceFunction["MultivariateTaylorPolynomial"][expr, {s12, s13, s23,
   s22, s33}, 4, "Weights" -> {2, 2, 2, 1, 1}]

(* Out[161]= -((Ex s12)/s22) + (Ex s13 s23^3)/(s22^2 s33^2) + (
 Ex s13 s23)/(s22 s33) - (Ex s12 s23^2)/(s22^2 s33) *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.