422 questions
0 votes
0 answers
24 views
Pari Integer conversion error when solving quadratic forms in Sagemath
While playing with quadratic forms in Sagemath 10.7, I came across this specific error: sage: version() 'SageMath version 10.7, Release Date: 2025-08-09' sage: t = 8 sage: B = matrix(ZZ, [(1, 0, 0),(1,...
-2 votes
1 answer
234 views
Solve a 2 equations systems of quadratic equations with 2 unknows [closed]
I would like to solve this system of equation for X and Y : Do you know if their exist a mathematical solution to this system ? And how to solve it ? Or a numerical solution ? If yes, do you think ...
1 vote
0 answers
66 views
How do I allow decimal numbers in this program? [duplicate]
class QuadraticFormula: def __init__(self, a, b, c): self.a = a self.b = b self.c = c def quadraticFormula(self): try: root1 = (-(self.b)+((self.b ...
-1 votes
1 answer
320 views
Find the first three terms in a geometric series using the given sum and product [closed]
My goal is to create a C++ program that computes a geometric sequence's first three terms. What is provided is the sum of the first three terms and their multiplication. It is assumed that the answers ...
0 votes
2 answers
190 views
How to convert vector of values to concave down parabolic curve
I have a vector of values 0-100. values <- runif(n = 1000, min = 0, max = 100) I'd like to transform these values into a concave down parabolic curve where values at the middle (approximately 50) ...
0 votes
1 answer
98 views
regex_search returns an error when using user input
I've been trying to calculate the discriminant of a quadratic equation. Though, I decided to use regex, so the user could put the entire equation instead of the information repeated times. The code ...
0 votes
1 answer
106 views
I have stored the values of f(x) in an array, but how do i print the value of x of a certain element f(x) from the array in C?
For a homework question we have been asked to numerically find the estimated roots of a quadratic equation ax^2 + bx + c, (where a, b, c is given by the user), we cant use the -b formula and we have ...
0 votes
1 answer
673 views
How to use plot_model to represent the coefficient of an interaction between a quadratic variable and a dummy in R?
I am trying to plot an interaction between a squared variable and a dummy from a multi-level logistic regression in R. Whilst I have no problem plotting these interactions with a non-quadratic ...
0 votes
1 answer
97 views
Find the control point of a quadratic curve
I have the start and end point of the curve and the top point of the curve. I would like to know how i can get the control point with this ? I have a graph with links. When a link is on a node, i want ...
1 vote
1 answer
170 views
Quadratic equation in Python
here is my code. Can anybody help to solve the problem? In the code below everything what I made but it doesn't work. def read_equation(textfile: str) -> str: with open(textfile, 'r') ...
0 votes
0 answers
57 views
Change Quadratic Objective Function in R Optimization (ROI Package)
I'm using the ROI package in R and am trying to setup an optimization with a quadratic objective function. It looks like the default function is of the form: 1/2 x^T Q x+ C^T x. I'd like to alter this ...
0 votes
1 answer
85 views
Score models based on log, quadratic, or linear fit on a 0-1 scale
I am looking for a way to score model fits of x,y data on a scale from 0 to 1, depending on which model the data best fit. If data fit a linear model best, the score would come out close to 1. Log ...
0 votes
0 answers
253 views
Getting Bezier Handles from a Curve's control points
I am working with a program that defines its Curves with 'Edges' that have three control points (The red points 0, 1, 2 in the attached image). I believe this is a Quadratic Curve. This is a list of ...
-2 votes
1 answer
72 views
How do I ask the user if they want to solve the equation again with a yes or no answer in Python?
Here's my code. import math print('I will solve the equation ax^2=bx=c=0') a = int(input('a= ')) b = int(input('b= ')) c = int(input('c= ')) d=b**2-4*a*c if d < 0: print('The equation has ...
2 votes
1 answer
69 views
Draw separate linear and quadratic regression graphs for each group in the same panel
I'd like to draw linear and quadratic regression line per group (data is different). For example, I make a graph like below. x=rep(c(0,40,80,120,160),time=2) y=c(16,21,22,26,35,29,44,72,61,54) group=...