Questions tagged [equation-solving]
763 questions
-1
votes
1 answer
Python Equation Solving
I am New to Python and am trying to solve an algebraic equation and having some trouble.
The Equation.
1.881 + 0.5 = x + ((2.2*2*1)^2)/(2*9.81*(1^2)*(x^2))
I can solve this in my calculator but would rather have python do this for me to make it…

JFran
- 1
- 1
-1
votes
1 answer
Reversing Order Scale - Math formulae help needed
Can anyone help with a formula / equation to help with my problem?
I'm trying to do (reverse) the following..........
I know the Base Price to be 250
The no. of orders are 8
Each order increases at scale of 1.5
=250*(1.5^7) = 4271.48 total
Im trying…

Simmo
- 1
- 1
-1
votes
1 answer
Python - solving an equation with unknowns (a and b) MSE (Mean Square error)
I want solve this equation (in string) (mean square error):
(2.5 - (2.0 * a + b ))**2 + (10.0 - (4.0 * a + b ))**2 + (32.0 - (6.0 * a + b ))**2 + (40.0 - (8.0 * a + b ))**2 + (60.0 - (10.0 * a + b ))**2
I want have 'a' and 'b', and final result…

kofiko
- 1
- 1
-1
votes
1 answer
How to solve exponential equation in python?
from sympy import solve, symbols
from math import e
a = symbols('a')
r = solve(1604+14*a**(-1)-14x1604*(1-e**(-1604*a))**-1, a)
print(r)
When i try to solve this equation ,the programme seems keep running (for 4 hours) with no solution. anyone can…

Ruben Martins
- 1
- 3
-1
votes
1 answer
iterating matlab symbolic solve function
I am trying to solve the equation below for array d. I have used the snippet below:
channel_size = 9e-3;
d = [11e-3, 12e-3];
sigma = 0.49;
ee = 727/9806.65;
alpha = d-channel_size;
sym('p',[1 2])
for i = 1:2
eqn = alpha ==…

Johnny
- 13
- 6
-1
votes
2 answers
Outputting results of loop of a loop
I am iteratively solving this implicit equation
using fsolve within a for loop over a range of values of the independent variable, V.
I also want to vary I_L and run the for loop over each value and generate an individual text files.
I know how to…

spudulike97
- 1
- 2
-1
votes
1 answer
I don't understand how to properly work with NaN in Java
I was wondering if anyone was able to understand the reason why this program doesn't return NaN the way it should.
I'm currently writing a program that calculates the solutions of a quadratic equation, but if the solutions are not real, I want it to…

Matteo Didonè
- 77
- 1
- 5
-1
votes
1 answer
Evaluating math expressions in a string in python
I've a bunch of equations that are loaded from a JSON file and I'd like to evaluate these expressions. These expressions have some constants and values of the constants (K1, K2, ...) are also saved in the json file. The values corresponding to the…

Natasha
- 1,111
- 5
- 28
- 66
-1
votes
1 answer
calculate zeros of the 6th degree polynomial in Anylogic
I wanted to solve the following equation in Anylogic:
0=44.00*m^6+7.84*m^4-43.2*m^3+7.84*m^2+1.16
Anylogic have a lot of Numeric tools. Can somebody help me how to use this tools?
Jan

Jan
- 1
-1
votes
2 answers
Equation Solving with python
There is a question like that:
1 X2 X 3 X 4 X 5 X 6 X 7 X 8 X 9 = 1942
X = must be x,+,-,÷ operators or nothing(89, 123 could be etc.)
How can i solve this problem with python?
Thanks.

ersan
- 393
- 1
- 9
-1
votes
2 answers
sympy unknown assignment
I'm trying to create a python program for solving equations:
from sympy import symbols, Eq, solve
list1 = ['x', 'y'] #<--- Letters of the user input
list1[0] = symbols(list1[0]) #<--- Assignment of the unknown x
list1[1] =…
user12591575
-1
votes
1 answer
How to get input of an equation from user and evaluate it in c++
I want to take a mathematical (single variable algebraic) equation from a user, say x^3 - 4x -9 = 0 and want to evaluate it for different values of x.
I've tried creating two arrays; one for getting the input of powers of x and another for…

No Name
- 41
- 3
-1
votes
1 answer
Equations involving angle constraints
I'm trying to solve a system of equations using sympy.
from sympy import *
def get_angles(a, b, c, d):
theta, phi, lamb = symbols('\\theta \\phi \\lambda', real=True)
a_eq = Eq(cos(theta / 2), a)
b_eq = Eq(exp(I * phi) * sin(theta / 2),…

tigerjack
- 1,158
- 3
- 21
- 39
-1
votes
1 answer
10,25,50,100,250,500,1000 how to find this sequence equation to plot in a graph
10,25,50,100,250,500,1000..... How to find above number series equation.
I need to generate the number pattern like above to plot it in my graph.
I tried like 2x, 2x, 2x + x / 2, 2x, 2x, ..... 2n, but I am unable to find a correct format of the…

Saravanan Sarwan
- 51
- 1
- 6
-1
votes
2 answers
Linear equation with 3 variables in C
I am given my C class homework, which is:
A hyperloop track is built of individual pipe segments of certain length. The track starts and ends with a bulkhead, and there is a bulkhead in-between each two pipe segments. The segments are produced by…

Aydin Misirzadeh
- 9
- 3