I just started learning Mathematica Kindly help me with this code. My actual Expression is about 300 lines in which I have many ArcTan[exp1,exp2]
forms, a solution to the toy problem which framed bellow might help me to solve my actual code issues.
I have a function
f[x1_, x2_] :=
Cos[x2*ArcTan[x1, x2]] +
Sin[x1*ArcTan[x2, x1] +
ArcTan[x1^2, x2]]*
E^ArcTan[x1 + x2, x1]
For some values of x1 and x2 I will have ArcTan[0,0]
form inside f[x1,x2]
. My aim is to replace ArcTan[0,0]
with a value "a".
What I did is
f[x1_, x2_] :=
Cos[x2*ArcTan[x1, x2]] +
Sin[x1*ArcTan[x2, x1] +
ArcTan[x1^2, x2]]*
E^ArcTan[x1 + x2, x1]
ReleaseHold[f[0, 0] /. ArcTan[0, 0] -> 0]
This is not working
I even tried this
f[x1_, x2_] :=
Cos[x2*ArcTan[x1, x2]] +
Sin[x1*ArcTan[x2, x1] +
ArcTan[x1^2, x2]] /.
ArcTan[0, 0] -> 0
f[0, 0]
This is not working.
Kindly suggest me a way.