Today, while attempting to find the area enclosed by these three functions
    f(x)=x³
    g(x)=x+3
    h(x)=0.5x²

I came across this equation:
x³-x-3=0
Generally, I would try to factorize this, but I can't seem to do it. I asked in sax and someone came up with x(x+1)(x-1)=3, but after that, nothing. Through the use of my calculator, then wolfram alpha, I was able to get that the answer is

which is about 1.6716998816571609697481497812195572287282648272045816921369024386475251300218[...]
and that there are two imaginary roots, which I am not interested in for this particular application, but still no idea how to actually solve it so if anybody knows, please explain how to do it, it would be greatly appreciated Rolling Eyes
EDIT: Oh by the way, the area is about 7.3u², in case you were wondering.


I apologise, but this is a very large image. But that's the work needed.

EDIT: As Jacobly told me in SAX, I used the incorrect intersection point. Therefore, it should be 0.5 on the integrals rather than 0, giving a new final answer of 7.295.
Wow, I didn't even notice that from 0 to 0.5, h(x)≥f(x), which means the area is a bit smaller, but that is not the point of the post...what you've posted is the calculus part of the problem, but I am focusing on the particular cubic equation, which seems very difficult to solve (I see you quickly glance over it and provide us with the solution (x³-x-3=0, x=1.6717)) did you somehow solve it and did not explain how, or did you just take the intersection point provided by your calculator and call it a day?
EDIT: jacobly just sent me the cubic equation, which is quite a fat one

but it works, and I'm happy leaving it at that. Here is some screenies of it in action:



There are also two other forms of this equation which spit out the two other roots, but I have not included those since this is the only real one and therefore, the only one of interest for this problem.
Cardano's method is another method for solving cubics by hand; it's not more practical overall, but it is at least easy to remember compared to forms of the cubic formula. The first step can also be skipped if the equation is in the form x³+px+q!
Using integrals is the way to go.
Okay, well I decided if it's worth doing, it's worth overdoing, so I decided to add on to the little program I made. It now gives all three roots for a cubic equation (real and imaginary ones), all 4 for a quartic equation, and I also added a quadratic equation solver in there. Didn't bother too much with aesthetics and size (it's like 550 bytes, so I doubt size will be an issue), it was just to make it work, sooo here it is:
Code:
{0->L1
a+bi
Menu("EQUATION TYPE","QUADRATIC",D,"CUBIC",A,"QUARTIC",B
Lbl D
Prompt A,B,C
sqrt(B^^2-4AC
Disp (~B+Ans)/(2A),(~B-Ans)/(2A
Real
Return
Lbl A
1->L
Prompt A,B,C,D
Goto C
Lbl B
2->L
Prompt A,B,C,D,E
A->U:B->V
B/A->B:C/A->C:D/A->D:E/A->E
C-3B^^2/8->F
D+B^^3/8-BC/2->G
E-3B^4n/d256+B^^2Cn/d16-BDn/d4->H
1->A:F/2->B:(F^^2-4H)/16->C:~G^^2/64->D
Lbl C
1/(3A->E
Ans->F
sqrt((2B^^3-9ABC+27A^^2D)^^2-4(B^^2-3AC)^^3->T
For(K,1,3
   ~B/(3A)-Ecuberoot(((.5)(2B^^3-9ABC+27A^^2D+T
   Ans-Fcuberoot(((.5)(2B^^3-9ABC+27A^^2D-T
   If L=1
   Disp Ans
   augment(L1,{Ans->L1
   If K=1
   Then
      ~(1+[i]sqrt(3))/(6A->E
      real(E)-imag(E)[i]->F
   End
   If K=2
   Then
      E->H:F->E:H->F
   End
End
If L=2
Then
   SortA(L1
   sqrt(L1(4->P:sqrt(L1(3->Q
   ~G/(8PQ->R
   V/4U
   Disp P+Q+R-Ans,P-Q-R-Ans,~P+Q-R-Ans,~P-Q+R-Ans
End
Real
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement