close
close
get the remainder in desmos

get the remainder in desmos

2 min read 24-01-2025
get the remainder in desmos

Desmos, the popular online graphing calculator, doesn't have a built-in function specifically labeled "remainder." However, there are several ways to calculate the remainder after division within Desmos. This guide will explore these methods, from using the modulo operator to employing more general mathematical techniques. Understanding how to get the remainder is crucial for various mathematical applications and programming tasks.

Understanding the Remainder

Before diving into Desmos-specific techniques, let's clarify what a remainder is. When you divide one number (the dividend) by another (the divisor), the remainder is the amount left over after performing the division. For example, when you divide 17 by 5, the quotient is 3, and the remainder is 2 (because 17 = 5 * 3 + 2).

Method 1: Using the Modulo Operator (%)

The most straightforward method to find the remainder in many programming languages and some calculators is using the modulo operator, denoted by the percent sign (%). Unfortunately, Desmos doesn't directly support the % symbol in the same way as programming languages like Python or JavaScript.

However, we can achieve the same result using Desmos's built-in functions. The modulo operation is essentially the same as finding the difference between a number and the largest multiple of the divisor less than or equal to the number.

Let's say we want to find the remainder when 17 is divided by 5. In Desmos, we can represent this as:

17 - 5*floor(17/5)

Where floor() is a Desmos function that rounds a number down to the nearest integer. This formula effectively subtracts the largest multiple of 5 (which is 15 in this case) from 17, leaving the remainder 2.

Example in Desmos: Type 17 - 5*floor(17/5) into the Desmos input bar. The result will be 2.

Method 2: Using the mod() Function (with limitations)

While Desmos doesn't have a standard mod() function like some other mathematical software, you can, in some cases, use the mod() function within a list or table to get the remainder. However, this method has limitations and may not work consistently for all calculations.

This method isn't ideal for standalone remainder calculations and is less reliable than the floor() method described above.

Method 3: Visual Representation with Graphs

While not a direct calculation, you can visualize the remainder using Desmos's graphing capabilities. This method is more suitable for understanding the concept of remainders rather than performing precise calculations.

For example, consider the graph of y = 5*floor(x/5). This represents the largest multiple of 5 less than or equal to x. The difference between y and x at a given point represents the remainder.

While visually appealing, this isn't an efficient way to compute remainders for specific numbers.

Practical Applications of Finding the Remainder

Calculating remainders has several practical applications:

  • Determining Even or Odd Numbers: A number is even if its remainder when divided by 2 is 0, and odd if the remainder is 1.
  • Cyclic Patterns: Remainders are essential in identifying repeating patterns or cycles.
  • Hashing Algorithms: Many hashing algorithms utilize modulo operations to distribute data evenly.
  • Cryptography: Remainders play a crucial role in various cryptographic techniques.

Conclusion

While Desmos lacks a dedicated "remainder" function, using the floor() function provides a reliable and efficient way to calculate the remainder of a division. Remember to replace the numbers in the formula dividend - divisor*floor(dividend/divisor) with your actual dividend and divisor. Understanding the concept of the remainder and these techniques empowers you to solve a broader range of mathematical problems within Desmos.

Related Posts