We’ve arranged the equation on a worksheet using the following image for our calculation process. Here, we have shown the variables and the coefficients separately.
Method 1 – Utilizing the Goal Seek Feature to Solve a Cubic Equation in Excel
Steps:
- Make a new table under the main data set to show the results after calculation.
- Set 0 as the initial value of X.
- Use the following formula to determine the value of Y when the initial value of X is zero.
=B13^3*C5+B13^2*C6+B13*C7+C9
- Press Enter to get the value for Y, which is 12.
- After finishing all the calculations, go to the Forecast group of the ribbon.
- Choose the What-If Analysis.
- From the dropdown menu, select Goal Seek.
- We will solve an equation for X when Y is given.
- After choosing the command from the previous step, you will see the Goal Seek dialog box.
- In the “Set cell” type box, input the cell address that will be the final output of this goal.
- In the “To value” type box, set the new output for the cell chosen in the previous step.
- In the “By changing cell” type box, select the cell, and we will get the above outcome by altering it.
- Press OK.
- After pressing OK, the Goal Seek feature will take some time to show the result after calculation.
- Here, to change the value of Y to 20, the value of X must be around 0.36304, which is one of the roots of this cubic equation.
Read More: How to Solve Polynomial Equation in Excel
Method 2 – Using Solver Add-in to Solve a Cubic Equation
Steps:
- Make a data table to show the results, just like the previous method.
- Calculate the value of Y from the formula shown in the previous discussion.
- Before going to the calculator, we need to activate the add-in.
- Go to the File tab of the ribbon.
- Select Options from the Excel Home window.
- Go to the Add-ins tab in the Excel Options dialog box.
- In the Manage section, choose Excel Add-ins and select Go.
Read More: How to Solve an Equation for X When Y is Given in Excel
- Mark the box beside Solver Add-in and press OK.
- You will see the Solver command in the Data group.
- Click on it.
- You will see the Solver Parameters dialog box.
- We have to set some parameters.
- In the Set Objective type box, select cell C13, which has a value of Y.
- Set the “Value Of” type box to 20. This sets the value of Y.
- Get the output 20 by changing the X value in cell B13.
- Ensure the solving method is nonlinear, as our equation is not linear.
- Press Solve.
Read More: How to Solve 2 Equations with 2 Unknowns in Excel
- After reviewing all the inputs, the Solver will show the final result.
- In our case, the value of X is 0.36304.
- If we enter this value into the equation, we will get the value of Y as 20.
Notes
- As both the Goal Seek and Solver need to input a value first for the calculation, you have set the value of Y = 20 in the first place.
- As in many cases, a cubic equation may have a simple root and more than one complex root. So, both the above methods will show the simple root.
Read More: How to Solve Polynomial Equation in Excel
Download the Practice Workbook
You can download the free Excel workbook here to practice.
Related Articles
- How to Solve for x in Excel
- How to Solve Algebraic Equations with Multiple Variables
- How to Solve System of Equations in Excel
- How to Solve Simultaneous Equations in Excel
- How to Solve Differential Equation in Excel
- How to Solve Exponential Equation in Excel
- How to Solve Colebrook Equation in Excel
- How to Solve Quadratic Equation in Excel VBA
<< Go Back to Excel Solve Equation | Excel Solver Examples | Solver in Excel | Learn Excel
Get FREE Advanced Excel Exercises with Solutions!