Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Couple questions

  1. Aug 6, 2008 #1
    Is there a better way to write this:

    [tex]g(x, n) = D(\frac{x}{n})*(n)[/tex]

    Where D(h), unless already a decimal, expands h into a sum of its places i.e. 47=40+7, then subtracts all of the terms that are greater than or equal to one.



    Also, if I have a function, say [tex]f(x) = \sqrt{x}[/tex], and I only wanted the integer values of x that made f(x) an integer, is there a different way of writing this, where I wouldn't have to plug in and check?(this goes for any function, where irrationality is possible or not)
     
  2. jcsd
  3. Aug 6, 2008 #2
    g(x,n) is the remainder of [tex]\frac{x}{n}[/tex], if x and n are integers.



    For f(x)=[tex]\sqrt{x}[/tex], it is possible [x=(f(x))2, f(x)>0; i.e. if f(x) is an integer, then x is an integer].

    Another example would be f(x) = loga (x) [a>0 is an integer]; with x=af(x), so if f(x) is an integer, then x is also an integer.

    But it is not possible for EVERY function, such as ln(x), sin(x), etc. For these, you would need to substitute and find out if they work (if there were an integer that would yield an integer value).
     
  4. Aug 6, 2008 #3
    Is there any special notation to represent the remainder of integer division?

    Is there any special notation (I thought there was here) to represent the remainder of integer division multiplied by the denominator integer?
     
  5. Aug 7, 2008 #4
    a mod b
    gives the remainder when a is divided by b
     
  6. Aug 7, 2008 #5
    To put it another way, [tex] a \equiv b (mod m) \Leftrightarrow m|(a-b) \Leftrightarrow a = km + b [/tex]

    Thus, a and b have the same remainder upon division by m.
     
  7. Aug 7, 2008 #6

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    Yes, and that's sometimes written a%b, just like [itex]a\times b[/itex] is sometimes written a*b.
     
  8. Aug 7, 2008 #7
    Isn't the a%b notation usually used in computer programming? I just didn't think they used it much in mathematics.
     
  9. Aug 7, 2008 #8

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    % and * are both used in programming, in emails, and other places where a rich symbol set is not easily available.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Couple questions
  1. Coupling coefficient (Replies: 1)

Loading...