+ Reply to Thread
Results 1 to 7 of 7

Solve 4 equations with 4 unknowns

  1. #1
    Forum Contributor
    Join Date
    07-23-2016
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    273

    Solve 4 equations with 4 unknowns

    I am trying to solve for 4 unknowns in 4 equations as below. I have managed to write a VBA routine to solve for 3 unknowns with 4 equations but I am getting totally lost in the weeds trying with 4 unknowns (4 cubic equations). Does any one have any VBA routines that does this?

    Points: (Y1,X1), (Y2,X2), (Y3,X3), (Y4,X4)
    Points: (10,2), (5,4), (4,11), (4,15)
    Four Equations with 4 variables:
    a) Y1=a+bX1+cX12+dX13
    b) Y2=a+bX2+cX22+dX23
    c) Y3=a+bX3+cX32+dX33
    d) Y4=a+bX4+cX42+dX43

    Solve for a,b c and d :

  2. #2
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    882

    Re: Solve 4 equations with 4 unknowns

    Cross-posted without a link

    https://www.mrexcel.com/forum/excel-...-unknowns.html
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,870

    Re: Solve 4 equations with 4 unknowns

    Your post does not comply with Rule 8 of our Forum RULES. Do not crosspost your question on multiple forums without including links here to the other threads on other forums.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Expect cross-posted questions without a link to be closed and a message will be posted by the moderator explaining why. We are here to help so help us to help you!

    Read this to understand why we ask you to do this, and then please edit your first post to include links to any and all cross-posts in any other forums (not just this site).
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: Solve 4 equations with 4 unknowns

    Before the programming, I recommend some time with the algebra (should be something you have done back in high school).
    This is a good start in solving systems of equations which will get up through using Gaussian elimination and an introduction to matrices for solving these: http://www.purplemath.com/modules/systlin1.htm
    This will extend the idea of Gaussian elimination to basic matrix algebra: http://www.mathcentre.ac.uk/resource...agrams/5_6.pdf
    Once you have that, review the help files for the MINVERSE() and MMULT() function. https://support.office.com/en-us/art...90033e188#bm13

    Once you understand the basic ideas behind solving systems of equations and the matrix algebra behind them, then it should be a relatively straightforward to program that solution into Excel.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  5. #5
    Forum Contributor
    Join Date
    07-23-2016
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    273

    Re: Solve 4 equations with 4 unknowns

    Thanks for feedback. I am very rusty on matrix math and really the solution I am looking for is a very minor part of my project for oil well drilling design of directional wells to intersect multiple well targets with strike and dip in three dimensions (North-South, East-West, and True Vertical depth. I think I found the solution in the Excel built-in Functions MMULT and MINVERSE that in combination with iteration down the well path will suffice. Thanks again for your feedback.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,870

    Re: Solve 4 equations with 4 unknowns

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  7. #7
    Forum Contributor
    Join Date
    07-23-2016
    Location
    Texas
    MS-Off Ver
    2016
    Posts
    273

    Re: Solve 4 equations with 4 unknowns

    I will once I implement to see if it works but may be a few days as I do have a day job that requires me to work on other business as opposed to my hobbies!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Solve problem with two variable unknowns
    By archiecc in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-06-2014, 11:19 AM
  2. Solve Many equations
    By p30tec in forum Excel General
    Replies: 11
    Last Post: 05-26-2014, 11:57 AM
  3. solving 9 equations 9 unknowns in vba
    By Milade8080 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-16-2014, 06:15 AM
  4. formula to solve for two unknowns
    By roninphx in forum Excel General
    Replies: 2
    Last Post: 02-03-2011, 08:35 PM
  5. 10 unknowns using 10 simultaneous equations
    By j_cash777 in forum Excel General
    Replies: 4
    Last Post: 01-31-2010, 07:12 PM
  6. [SOLVED] solving for 2 unknowns using 2 simultaneous equations
    By elaturnas in forum Excel General
    Replies: 1
    Last Post: 02-08-2005, 04:06 PM
  7. [SOLVED] solving for 3 unknowns using 3 simultaneous equations
    By elaturnas in forum Excel General
    Replies: 0
    Last Post: 02-08-2005, 02:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1