How to check whether two functions are equal in mathematica?

  • Context: Mathematica 
  • Thread starter Thread starter tgt
  • Start date Start date
  • Tags Tags
    Functions Mathematica
Click For Summary

Discussion Overview

The discussion revolves around methods to determine whether two functions are equal in Mathematica, focusing on practical approaches and potential pitfalls in the software's evaluation of function equality.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant initially asks how to check for function equality.
  • Another suggests using the expression f[x]==g[x] to compare the functions.
  • A subsequent reply indicates that this method does not work as expected.
  • One participant proposes calculating the difference between the two functions as a potential solution.
  • A later reply acknowledges the suggestion and expresses intent to try that approach.
  • Another participant clarifies that the initial method requires specific arguments for evaluation at a single point.
  • Alternative methods such as TrueQ[f[x]==g[x]] or Simplify[f[x]==g[x]] are also mentioned as possible solutions.

Areas of Agreement / Disagreement

Participants express differing views on the effectiveness of the initial method for checking function equality, with some suggesting alternative approaches. The discussion remains unresolved regarding the best method to use.

Contextual Notes

There are limitations regarding the assumptions needed for function evaluation, as well as the requirement for specific arguments in Mathematica.

tgt
Messages
519
Reaction score
2
How to do that?
 
Physics news on Phys.org
DaleSpam said:
f[x]==g[x]

It doesn't work like that.
 
Can you ask it to calculate the difference of the two functions?
 
robphy said:
Can you ask it to calculate the difference of the two functions?

Thats a good point, I'd try that.
 
tgt said:
It doesn't work like that.
Oops, you are correct, it wants you to supply arguments to evaluate it at a single point.

You can use TrueQ[f[x]==g[x]] or Simplify[f[x]==g[x]] instead.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K