"if" function for math equations

%3CLINGO-SUB%20id%3D%22lingo-sub-2285643%22%20slang%3D%22en-US%22%3E%22if%22%20function%20for%20math%20equations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2285643%22%20slang%3D%22en-US%22%3E%3CP%3Ehello!%20i%20need%20to%20solve%20this%20math%20equation%20using%20the%20function%20%22if%22%20in%20excel.%20is%20there%20any%20way%20i%20can%20do%20it%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2285643%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2285820%22%20slang%3D%22en-US%22%3ERe%3A%20%22if%22%20function%20for%20math%20equations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2285820%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1035643%22%20target%3D%22_blank%22%3E%40oksanasana%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20may%20use%20Goal%20Seek%20(Data-%26gt%3BWhat-If-Analysis)%20for%20that%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20391px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275262i376516A0CF512847%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2286102%22%20slang%3D%22en-US%22%3ERe%3A%20%22if%22%20function%20for%20math%20equations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2286102%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1035643%22%20target%3D%22_blank%22%3E%40oksanasana%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAre%20we%20missing%20some%20information%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20does%20a%3D0%20and%20b%3D1%20have%20to%20do%20with%20the%20solution%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhy%20do%20you%20require%20an%20%22if%22%20formula%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20are%203%20solutions.%26nbsp%3B%20See%20the%20image%20below.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20able%20to%20use%20Solver%20to%20find%20the%20solutions%20in%20A3%20and%20A4.%26nbsp%3B%20I%20had%20to%20write%20my%20own%20function%20to%20find%20the%20solution%20in%20A2.%26nbsp%3B%20(PS%3A%20But%20Goal%20Seek%20finds%20a%20close%20solution.)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20formula%20in%20B2%20is%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DA2%5E3%20-%203*A2%20%2B%201%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20values%20of%20x%20are%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA2%3A%20-1.87938524157182%3C%2FP%3E%3CP%3EA3%3A%200.347296355333864%3C%2FP%3E%3CP%3EA4%3A%201.53208888623792%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22x%5E3%20formula.jpg%22%20style%3D%22width%3A%20825px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275267iE0DEDDE894CFD941%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22x%5E3%20formula.jpg%22%20alt%3D%22x%5E3%20formula.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2286275%22%20slang%3D%22en-US%22%3ERe%3A%20%22if%22%20function%20for%20math%20equations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2286275%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1035643%22%20target%3D%22_blank%22%3E%40oksanasana%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAre%20we%20missing%20some%20information%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20does%20a%3D0%20and%20b%3D1%20have%20to%20do%20with%20the%20solution%3F%26nbsp%3B%20My%20guess%3A%26nbsp%3B%20a%20%26lt%3B%3D%20x%20%26lt%3B%3D%20b%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhy%20do%20you%20require%20an%20IF%20formula%3F%26nbsp%3B%20Are%20you%20supposed%20to%20use%20Iterative%20calculation%3F%26nbsp%3B%20LAMBDA%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThere%20are%203%20solutions.%26nbsp%3B%20See%20the%20image%20below.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20used%20Solver%20to%20find%20the%20solutions%20in%20A3%20and%20A4.%26nbsp%3B%20I%20wrote%20my%20own%20function%20to%20find%20the%20solution%20in%20A2.%26nbsp%3B%20(PS%3A%20But%20Goal%20Seek%20finds%20a%20close%20solution.)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20formula%20for%20f(x)%20in%20B2%20is%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DA2%5E3%20-%203*A2%20%2B%201%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20values%20of%20x%20are%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA2%3A%20-1.87938524157182%3C%2FP%3E%3CP%3EA3%3A%200.347296355333864%3C%2FP%3E%3CP%3EA4%3A%201.53208888623792%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22x%5E3%20formula.jpg%22%20style%3D%22width%3A%20771px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F275270iA9F560C864963626%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22x%5E3%20formula.jpg%22%20alt%3D%22x%5E3%20formula.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

hello! i need to solve this math equation using the function "if" in excel. is there any way i can do it?

2 Replies

@oksanasana 

You may use Goal Seek (Data->What-If-Analysis) for that

image.png

@oksanasana 

Are we missing some information?

 

What does a=0 and b=1 have to do with the solution?  My guess:  a <= x <= b?

 

Why do you require an IF formula?  Are you supposed to use Iterative calculation?  LAMBDA?

 

There are 3 solutions.  See the image below.

 

I used Solver to find the solutions in A3 and A4.  I wrote my own function to find the solution in A2.  (PS: But Goal Seek finds a close solution.)

 

The formula for f(x) in B2 is:

 

=A2^3 - 3*A2 + 1

 

The values of x are:

 

A2: -1.87938524157182

A3: 0.347296355333864

A4: 1.53208888623792

 

x^3 formula.jpg