Questions tagged [linear-equation]

An algebraic equation of the form y = mx+b

A linear equation is an algebraic equation in which each term is either a constant or the product of a constant and (the first power of) a single variable. More on Wolfram and Wikipedia.

203 questions
0
votes
0 answers

Evaluate X from an Equation with LHS = RHS in R programming

I am trying to find optimal price value, for which I need Optimal Quantity. I need to evaluate this : 10- 2*Q/5 = 1. I want to get the value of Q here. want to use LHS and RHS as inputs as LHS is derived from D(Total Revenue Function) which is…
anjali
  • 9
  • 2
0
votes
1 answer

Solving Linear Equation with Python

Problem question: Consider a ferry that can carry both cars and campers across a waterway. Each trip costs the owner approximately $10. The fee for cars is $3 and the fee for campers is $9. Let X and Y be the number of cars and campers, respectively…
Brock
  • 5
  • 2
0
votes
0 answers

solve a system of lineare equation gauss Jordan method in matlab

I try to solve system of lineare equation using the Gauss Jordan methode. I try my code with a smaller matrice and I got the rigth answer. Now I try it with a bigger matrice and I got NAN(not a number) as answer. I don't what I am doing wrong. a…
pat des pat
  • 117
  • 3
0
votes
1 answer

Numpy: Is there any simple way to solve equation in form Ax = b such that some x's takes fixed values

So basically I want to solve Ax = b but I want the value of x1 to always be equation to say 4. For example, if A is 3x3 and x is 3x1 then the answer of the above equation should be in form x = [4, x2, x3]
Archaic
  • 57
  • 6
0
votes
1 answer

How to get regression equation?

I am using PyCaret for comparison of regression models on my data. After blending of the top 3 models, how can I get the final regression equation(model) of the blender? Please help!!
0
votes
1 answer

Programmatically solve for chemical molar ratio between multiple reactions

Consider the reactions: C6.H12.O6+6O2->6H2.O1+6C1.O2 (glucose + 6oxygen ->6 water + 6carbon dioxide) 2C1.H4.O1+C1.O2->C3.H6.O3+H2.O1 (2*methanol + carbon dioxide -> 1,3-dihydroxypropanone + water) How can I programmatically figure out the molar…
0
votes
0 answers

R: Least squares estimation in linear equation systems

I'm going to estimate some parameters of linear equation systems with repeated measures. My equations will look like this: Variant1: Variant2: At least 10 values (repeated measures; technical replicates) are known for every and . I want to…
Anti
  • 365
  • 1
  • 14
0
votes
1 answer

How to combine different equations automatically

I have 9 different equations that contain only 7 unknowns. I would like to generate a code that creates all the possible systems of 7 equations and return the cases in which all the variables have a positive result. The 9 equations are: eq1 =…
0
votes
1 answer

How can i remove the denominator of all the Fractions

I used NumPy and Fractions module to find the answers to a given system of equations. But I want to convert all the answers to integers by dividing through by the highest denominator. How do I do that when I don't even know the values. import…
0
votes
1 answer

How to perform linear regression for multiple columns and get a dataframe output with: regression equation and r squared value?

My dataframe looks like this df = structure(list(Date_Time_GMT_3 = structure(c(1625025600, 1625026500,1625027400, 1625028300, 1625029200, 1625030100), class = c("POSIXct", "POSIXt"), tzone = "EST"), …
Kristen Cyr
  • 629
  • 5
  • 16
0
votes
1 answer

Solving linear system of equations containing matrices and vectors

I want to solve the following linear system of equations in Python: with A is a matrix of size 3 x 3 b is a vector of ones of length 3 b' stands for the transpose of b c is a vector of zeros of length 3 d is a vector of length 3 My Python code is…
Christina
  • 903
  • 16
  • 39
0
votes
1 answer

Solve linear equation with 2 unkown and 3 equations in numpy with np.linalg.solve

3 euqations with two unknow have 3 solutions: One solution, infinte solutions, no solution. How would you write this in Numpy to get the solutions? I tried it the way you would do it with 3 unknowns: import numpy as np a = np.array([-9,-8, 14]) A…
Withi Weis
  • 53
  • 5
0
votes
0 answers

How to couple a differential equation with a normal equation?

My problem is the following: I have a differential equation for X in dependence of z, dXdz. This equation depends on a Temperature T. This temperature T depends on dXdz in a seperate equation, equation 2. Technically, I could calculate the…
0
votes
1 answer

Linear equation of two vaariable

I want to find the solutions of linear equation of two variable(i know that there are infinitly many solution but i have to print some of them!) so i tried in C language what i have did is simply taken the input of coefficient of X,Y and c. Then…
0
votes
1 answer

.coeff() does not give correct answer Python Sympy

I am trying to find the coefficients of an expression in sympy. I made a code but it gives a wrong output. the first(given below) code is how I am trying to write the program(eventhough it is not completely correct). import sympy as sp a0, a1, a2,…
user15014634