Found 16 Articles for Mathematical Problems

Simpson's 1/3 Rule for definite integral

karthikeya Boyini
Updated on 17-Jun-2020 08:45:38

705 Views

Like the Trapezoidal Rule, Simpson’s 1/3rd rule is also used to find the integral value from the range a to b. The main difference between trapezoidal and the Simpson’s 1/3rd rule is, in the trapezoidal rule, the whole sections are divided into some trapezoids, but in this case, each trapezoid are also divided into two parts.For this rule, we will follow this formula:Here h is the width of the interval, and n is the number of intervals. We can find the h by using Input and OutputInput: The function f(x): (x+(1/x). The lower and upper limit: 1, 2. The number of ... Read More

Trapezoidal Rule for definite integral

Samual Sam
Updated on 17-Jun-2020 08:48:56

983 Views

Definite integrals can be solved using this trapezoidal rule. To integrate a function f(x) between the range a to b is basically finding the area below the curve from point x = a to x = b. To find that area, we can divide the area into n trapezoids, and the width of each trapezoid is h, so we can say that (b - a) = nh. When the number of trapezoids increases, the result of area calculation will be more accurate. To solve integrals, we will follow this formula.Here h is the width of the interval, and n is the ... Read More

Secant method to solve non-linear equation

Chandu yadav
Updated on 17-Jun-2020 08:55:00

918 Views

Secant method is also used to solve non-linear equations. This method is similar to the Newton-Raphson method, but here we do not need to find the differentiation of the function f(x). Only using f(x), we can find f’(x) numerically by using Newton’s Divide difference formula. From the Newton-Raphson formula, we know that, Now, using divide difference formula, we get, By replacing the f’(x) of Newton-Raphson formula by the new f’(x), we can find the secant formula to solve non-linear equations.Note: For this method, we need any two initial guess to start finding the root of non-linear equations.Input and OutputInput: The ... Read More

Evaluate Postfix Expression

karthikeya Boyini
Updated on 17-Jun-2020 07:45:37

7K+ Views

For solving a mathematical expression, we need prefix or postfix form. After converting infix to postfix, we need postfix evaluation algorithm to find the correct answer.Here also we have to use the stack data structure to solve the postfix expressions.From the postfix expression, when some operands are found, pushed them in the stack. When some operator is found, two items are popped from the stack and the operation is performed in correct sequence. After that, the result is also pushed in the stack for future use. After completing the whole expression, the final result is also stored in the stack ... Read More

Convert Infix to Postfix Expression

Arjun Thakur
Updated on 02-Sep-2023 01:50:33

69K+ Views

Infix expressions are readable and solvable by humans. We can easily distinguish the order of operators, and also can use the parenthesis to solve that part first during solving mathematical expressions. The computer cannot differentiate the operators and parenthesis easily, that’s why postfix conversion is needed.To convert infix expression to postfix expression, we will use the stack data structure. By scanning the infix expression from left to right, when we will get any operand, simply add them to the postfix form, and for the operator and parenthesis, add them in the stack maintaining the precedence of them.Note: Here we will ... Read More

Convert Infix to Prefix Expression

Samual Sam
Updated on 17-Jun-2020 07:51:44

5K+ Views

To solve expressions by the computer, we can either convert it in postfix form or to the prefix form. Here we will see how infix expressions are converted to prefix form.At first infix expression is reversed. Note that for reversing the opening and closing parenthesis will also be reversed.for an example: The expression: A + B * (C - D)after reversing the expression will be: ) D – C ( * B + Aso we need to convert opening parenthesis to closing parenthesis and vice versa.After reversing, the expression is converted to postfix form by using infix to postfix algorithm. ... Read More

Advertisements