0
$\begingroup$

Suppose the function

f[x_,y_] := P[x/y]*Sqrt[1-x^2/y^2] + F[x/y]*Log[(1-Sqrt[1-x^2/y^2])/(1+Sqrt[1-x^2/y^2])] 

Here $P[x,y], F[x,y]$ are polynomial of some definite degree in the argument $x/y$.

My question is, whether some manipulation exists providing "smart" manipulation with $f[x,y]$ which neglect positive degrees of $x/y$ inside $P,F$ (say, assuming it to be small), but leaving the argument of the logarithm completely unchanged?

For specific example, assume

f[x_,y_] := (a+b*x/y + c*x/y^2)*Sqrt[1-x^2/y^2] + (d + e*x/y + f*x^2/y^2)*Log[(1-Sqrt[1-x^2/y^2])/(1+Sqrt[1-x^2/y^2])] 

I need the following output after the manipulation:

f[x_,y_] := a + d*Log[(1-Sqrt[1-x^2/y^2])/(1+Sqrt[1-x^2/y^2])] 
$\endgroup$
4
  • $\begingroup$ A more concrete demonstration might be helpful. $\endgroup$ Jul 30, 2017 at 9:05
  • $\begingroup$ What do you mean by neglect? $\endgroup$
    – Andrew
    Jul 30, 2017 at 9:06
  • $\begingroup$ @Andrew : I've added an example. $\endgroup$ Jul 30, 2017 at 9:10
  • $\begingroup$ @Andrew : I want to set them to zero. $\endgroup$ Jul 30, 2017 at 9:11

1 Answer 1

1
$\begingroup$

If there is only one logarithm, as in your example, this will do:

g[x_,y_]=f[x, y] /. Log[A_] :> (B = A; C) /. x -> 0 /. C -> Log[B]
$\endgroup$
5
  • $\begingroup$ sorry, couly you please explain briefly what does this code mean? $\endgroup$ Jul 30, 2017 at 9:30
  • $\begingroup$ First Log[A] changed on symbol C, then x is put to zero - it will nullify all the terms you want. Finally C is changed back to Log[A]. it is assumed here that symbols A, B, C are not used in the code. $\endgroup$
    – Andrew
    Jul 30, 2017 at 9:34
  • $\begingroup$ Thank you very much! $\endgroup$ Jul 30, 2017 at 9:36
  • $\begingroup$ Could you also please help me how to remain unchanged both the logarithm and the square root in the front of P[x,y] in my example? Add $$ \text{Log[A_] -> (B = A; C) && Sqrt[1-x^2/y^2] -> (B1 = A1; C1)} $$ instead of $$ \text{Log[A_] -> (B = A; C),} $$ right? $\endgroup$ Jul 30, 2017 at 9:51
  • 1
    $\begingroup$ {Log[A_] :> (B = A; C), Sqrt[A1_] :> (B1 = A1; C1)} $\endgroup$
    – Andrew
    Jul 30, 2017 at 9:59

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.