home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e031 / 3.ddi / MATHZIP2 / STARTUP / INVERSEF.M < prev    next >
Encoding:
Text File  |  1991-09-23  |  1.9 KB  |  65 lines

  1.  
  2. Begin["System`"]
  3. Unprotect[InverseFunction]
  4.  
  5. Begin["`Private`"]
  6.  
  7. Format[InverseFunction[f_]] := SequenceForm[f^"(-1)"]
  8. Format[InverseFunction[f_,1]] := SequenceForm[f^"(-1)"]
  9. Format[InverseFunction[f_,1,1]] := SequenceForm[f^"(-1)"]
  10.  
  11. InverseFunction[Sin]=ArcSin
  12. InverseFunction[Cos]=ArcCos
  13. InverseFunction[Tan]=ArcTan
  14. InverseFunction[Csc]=ArcCsc
  15. InverseFunction[Sec]=ArcSec
  16. InverseFunction[Cot]=ArcCot
  17. InverseFunction[ArcSin]=Sin
  18. InverseFunction[ArcCos]=Cos
  19. InverseFunction[ArcTan]=Tan
  20. InverseFunction[ArcCsc]=Csc
  21. InverseFunction[ArcSec]=Sec
  22. InverseFunction[ArcCot]=Cot
  23. InverseFunction[Sinh]=ArcSinh
  24. InverseFunction[Cosh]=ArcCosh
  25. InverseFunction[Tanh]=ArcTanh
  26. InverseFunction[Csch]=ArcCsch
  27. InverseFunction[Sech]=ArcSech
  28. InverseFunction[Coth]=ArcCoth
  29. InverseFunction[ArcSinh]=Sinh
  30. InverseFunction[ArcCosh]=Cosh
  31. InverseFunction[ArcTanh]=Tanh
  32. InverseFunction[ArcCsch]=Csch
  33. InverseFunction[ArcSech]=Sech
  34. InverseFunction[ArcCoth]=Coth
  35. InverseFunction[Log]=Exp
  36. InverseFunction[Exp]=Log
  37. InverseFunction[Power,1,2]=(#1^(1/#2))&
  38. InverseFunction[Power,2,2]=Log
  39.  
  40. InverseFunction[JacobiSN,1,2]=InverseJacobiSN
  41. InverseFunction[JacobiSD,1,2]=InverseJacobiSD
  42. InverseFunction[JacobiSC,1,2]=InverseJacobiSC
  43. InverseFunction[JacobiCS,1,2]=InverseJacobiCS
  44. InverseFunction[JacobiCN,1,2]=InverseJacobiCN
  45. InverseFunction[JacobiCD,1,2]=InverseJacobiCD
  46. InverseFunction[JacobiNS,1,2]=InverseJacobiNS
  47. InverseFunction[JacobiNC,1,2]=InverseJacobiNC
  48. InverseFunction[JacobiDS,1,2]=InverseJacobiDS
  49. InverseFunction[JacobiDC,1,2]=InverseJacobiDC
  50.  
  51. InverseFunction[Identity]=Identity
  52. f_[InverseFunction[f_][x___]] ^= x
  53. InverseFunction[f_][f_[x___]] := x
  54. f_[InverseFunction[f_,1,1][x___]] ^= x
  55. InverseFunction[f_,1,1][f_[x___]] := x
  56. Literal[InverseFunction[Composition[f___]]] := Composition@@
  57.                     (InverseFunction/@Reverse[{f}])
  58.  
  59. Protect[InverseFunction]
  60.  
  61. End[]
  62. End[]
  63.  
  64. Null
  65.