Skip to main content
added 1 character in body
Source Link
J.A
  • 1.3k
  • 6
  • 16

So I have this function :

Sqrt[-1 + Tanh[#1 - #2]^2] &

How can I transform it into

f[x_,t]=Sqrt[y_]=Sqrt[-1 + Tanh[x - y]^2] 

I tried

Sqrt[-1 + Tanh[#1 - #2]^2] &/. #1 -> x /. #2 -> y /. & -> 1

But apparently /. & -> 1 doesn't work

So I have this function :

Sqrt[-1 + Tanh[#1 - #2]^2] &

How can I transform it into

f[x_,t]=Sqrt[-1 + Tanh[x - y]^2] 

I tried

Sqrt[-1 + Tanh[#1 - #2]^2] &/. #1 -> x /. #2 -> y /. & -> 1

But apparently /. & -> 1 doesn't work

So I have this function :

Sqrt[-1 + Tanh[#1 - #2]^2] &

How can I transform it into

f[x_,y_]=Sqrt[-1 + Tanh[x - y]^2] 

I tried

Sqrt[-1 + Tanh[#1 - #2]^2] &/. #1 -> x /. #2 -> y /. & -> 1

But apparently /. & -> 1 doesn't work

Tweeted twitter.com/StackMma/status/1158211447710769153
Became Hot Network Question
Source Link
J.A
  • 1.3k
  • 6
  • 16

How to transform a function from f[#1] to f[x]

So I have this function :

Sqrt[-1 + Tanh[#1 - #2]^2] &

How can I transform it into

f[x_,t]=Sqrt[-1 + Tanh[x - y]^2] 

I tried

Sqrt[-1 + Tanh[#1 - #2]^2] &/. #1 -> x /. #2 -> y /. & -> 1

But apparently /. & -> 1 doesn't work