Given a number . The task is to find the value of the below expression for the given value of .
Input: X = √2
Input: X = 3
Approach: The idea is to use Binomial expression. We can take these two terms as 2 binomial expressions. By expanding these terms we can find the desired sum. Below is the expansion of the terms.
Now put X= in EQ(1)
Below is the implementation of above approach:
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.
- Program to evaluate simple expressions
- Queries to evaluate the given equation in a range [L, R]
- Find all possible outcomes of a given expression
- Maximum and Minimum Values of an Algebraic Expression
- Check for balanced parentheses in an expression | O(1) space | O(N^2) time complexity
- Find the missing digit x from the given expression
- Deriving the expression of Fibonacci Numbers in terms of golden ratio
- Find a permutation of 2N numbers such that the result of given expression is exactly 2K
- Print the balanced bracket expression using given brackets
- Maximize the value of the given expression
- What is an Expression and What are the types of Expressions?
- Maximize the expression (A AND X) * (B AND X) | Bit Manipulation
- Find the minimum value of X for an expression
- Find Range Value of the Expression
- Find minimum value of the expression by choosing K elements from given array
- Find the minimum value of the given expression over all pairs of the array
- Parity of the given mathematical expression using given N numbers
- Maximum value of expression (arr[i] + arr[j] * arr[k]) formed from a valid Triplet
- Expression Evaluation
- Write a program to reverse digits of a number
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.