Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9164867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:47:05+00:00 2026-06-17T14:47:05+00:00

Using excel solver, it is easy to find a solution (optimum value for x

  • 0

Using excel solver, it is easy to find a solution (optimum value for x and y )for this equation:

(x*14.80461) + (y * -4.9233) + (10*0.4803) ≈ 0

However, I can’t figure out how to do this in Python. The existing scipy optimize library function like fsolve() or leastsq() seems to work with only one variable…. (I might just not know how to use them)…

Any suggestions?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:47:06+00:00Added an answer on June 17, 2026 at 2:47 pm
    >>> def f(x):
    ...     return x[0]*14.80461 + x[1]*(-4.9233) + x[2]*(10*0.4803) 
    >>> def vf(x):
    ...    return [f(x), 0, 0]
    >> xx = fsolve(vf, x0=[0,0,1])
    >>> 
    >>> f(xx)
    8.8817841970012523e-16
    

    Since the solution is not unique, different initial values for an unknown lead to different (valid) solutions.

    EDIT: Why this works. Well, it’s a dirty hack. It’s just that fsolve and its relatives deal with systems of equations. What I did here, I defined a system of three equations (f(x) returns a three-element list) for three variables (x has three elements). Now fsolve uses a Newton-type algorithm to converge to a solution.

    Clearly, the system is underdefined: you can specify arbitrary values of two variables, say, x[1] and x[2] and find x[0] to satisfy the only non-trivial equation you have. You can see this explicitly by specifying a couple of initial guesses for x0 and see different outputs, all of which satisfy f(x)=0 up to a certain tolerance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to read all cell value from excel sheet using Apache POI and
I've created a page where our partners can upload excel files with statistics using
I'm trying to find the dimensions of an Excel table using C# by finding
I am lookin for a solution to find cubic roots in Excel. I found
With this: using Excel = Microsoft.Office.Interop.Excel; I'm opening the excel and after I'm setting
Solved Hi currently im using SimpleXLSX to parse the xlsx (excel file), all the
Using Excel 2010 and SQL Server 2008 R2. I used import and export data
I'm using Excel 2010 to read some SQL data using an ODBC data connection.
INTRODUCTION I'm using excel downloads as a way of users downloading a score sheet,
I am using Excel VBA 2003. Is it possible to create new recordset by

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.