SlideShare a Scribd company logo
Analytical Solution Of Cubic Equation
In this paper will illustrated how to find roots of cubic equation with formula as
following:-
Note:-
If your equation as following just divide equation on
parameter of x 3
(A) .The cubic equation has normally three real roots sometimes
all of them different or two of them equal each other and in cases has one real root.
Example:-
I. Roots
II. Roots
III. Root
CODE OF FUNCTION:-
function [ROOT] = CERO(A,B,C)
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
Q=(power(A,2)-3*B)/9;
R=(2*power(A,3)-9*A*B+27*C)./54;
MM=power(R,2)-power(Q,3);
if MM<=0;
THET=acos(R./sqrt(power(Q,3)));
X1=-(2*sqrt(Q)*cos(THET./3))-A./3;
X2=-(2*sqrt(Q)*cos((THET-2*pi)./3))-A./3;
X3=-(2*sqrt(Q)*cos((THET+2*pi)./3))-A./3;
ROOT=[X1 X2 X3];
else
S=-sign(R)*power((abs(R)+sqrt(MM)),1/3);
TT=Q./S;
X1=S+TT-A./3;
ROOT=X1;
end
end
Snapshot of MATLAB Screen:-
I Wish You All The Best
Good Luck For All

More Related Content

What's hot

Maxima & Minima for IIT JEE | askIITians
Maxima & Minima for IIT JEE | askIITiansMaxima & Minima for IIT JEE | askIITians
Maxima & Minima for IIT JEE | askIITians
askiitian
 
Pre-Cal 30S January 14, 2009
Pre-Cal 30S January 14, 2009Pre-Cal 30S January 14, 2009
Pre-Cal 30S January 14, 2009
Darren Kuropatwa
 
Problem 3
Problem 3Problem 3
Problem 3aldrins
 
Pre-Cal 30S January 15, 2009
Pre-Cal 30S January 15, 2009Pre-Cal 30S January 15, 2009
Pre-Cal 30S January 15, 2009
Darren Kuropatwa
 
Forest plot in r
Forest plot in rForest plot in r
Forest plot in r
Ubaldo E. Bedoya M .
 
AP Calculus 1984 FRQs
AP Calculus 1984 FRQsAP Calculus 1984 FRQs
AP Calculus 1984 FRQs
A Jorge Garcia
 
Roll's theorem
Roll's theoremRoll's theorem
Roll's theorem
Md. Mizanur Rahaman
 
Presentacion integrales por sustitucion
Presentacion integrales por sustitucionPresentacion integrales por sustitucion
Presentacion integrales por sustitucion
Alan Bravo
 
Problem 3
Problem 3Problem 3
Problem 3aldrins
 
1988 FRQs AP Calculus
1988 FRQs AP Calculus1988 FRQs AP Calculus
1988 FRQs AP Calculus
A Jorge Garcia
 
303
303303
Matlab lecture 7 – regula falsi or false position method@taj
Matlab lecture 7 – regula falsi or false position method@tajMatlab lecture 7 – regula falsi or false position method@taj
Matlab lecture 7 – regula falsi or false position method@taj
Tajim Md. Niamat Ullah Akhund
 
Mean Value Theorem | Mathematics
Mean Value Theorem | MathematicsMean Value Theorem | Mathematics
Mean Value Theorem | Mathematics
askIITians - Creating Engineers & Doctors
 
Working with exponents unit
Working with exponents unitWorking with exponents unit
Working with exponents unitkwilkinson07
 
Numerical integration;Gaussian integration one point, two point and three poi...
Numerical integration;Gaussian integration one point, two point and three poi...Numerical integration;Gaussian integration one point, two point and three poi...
Numerical integration;Gaussian integration one point, two point and three poi...
vaibhav tailor
 

What's hot (19)

Maxima & Minima for IIT JEE | askIITians
Maxima & Minima for IIT JEE | askIITiansMaxima & Minima for IIT JEE | askIITians
Maxima & Minima for IIT JEE | askIITians
 
Pre-Cal 30S January 14, 2009
Pre-Cal 30S January 14, 2009Pre-Cal 30S January 14, 2009
Pre-Cal 30S January 14, 2009
 
Problem 3
Problem 3Problem 3
Problem 3
 
Pre-Cal 30S January 15, 2009
Pre-Cal 30S January 15, 2009Pre-Cal 30S January 15, 2009
Pre-Cal 30S January 15, 2009
 
Forest plot in r
Forest plot in rForest plot in r
Forest plot in r
 
AP Calculus 1984 FRQs
AP Calculus 1984 FRQsAP Calculus 1984 FRQs
AP Calculus 1984 FRQs
 
Roll's theorem
Roll's theoremRoll's theorem
Roll's theorem
 
Presentacion integrales por sustitucion
Presentacion integrales por sustitucionPresentacion integrales por sustitucion
Presentacion integrales por sustitucion
 
Metodo de muller
Metodo de mullerMetodo de muller
Metodo de muller
 
Problem 3
Problem 3Problem 3
Problem 3
 
1988 FRQs AP Calculus
1988 FRQs AP Calculus1988 FRQs AP Calculus
1988 FRQs AP Calculus
 
Day 5 examples
Day 5 examplesDay 5 examples
Day 5 examples
 
303
303303
303
 
Matlab lecture 7 – regula falsi or false position method@taj
Matlab lecture 7 – regula falsi or false position method@tajMatlab lecture 7 – regula falsi or false position method@taj
Matlab lecture 7 – regula falsi or false position method@taj
 
Mean Value Theorem | Mathematics
Mean Value Theorem | MathematicsMean Value Theorem | Mathematics
Mean Value Theorem | Mathematics
 
Calc 3.2b
Calc 3.2bCalc 3.2b
Calc 3.2b
 
Working with exponents unit
Working with exponents unitWorking with exponents unit
Working with exponents unit
 
MEAN VALUE THEOREM
MEAN VALUE THEOREMMEAN VALUE THEOREM
MEAN VALUE THEOREM
 
Numerical integration;Gaussian integration one point, two point and three poi...
Numerical integration;Gaussian integration one point, two point and three poi...Numerical integration;Gaussian integration one point, two point and three poi...
Numerical integration;Gaussian integration one point, two point and three poi...
 

Similar to Matlab analytical solution of cubic equation

4-Corner Rational Distance Problems
4-Corner Rational Distance Problems4-Corner Rational Distance Problems
4-Corner Rational Distance Problems
Sara Alvarez
 
Matrices
MatricesMatrices
Matlab
MatlabMatlab
Modern Control Engineering Problems Ch 3.pdf
Modern Control Engineering Problems Ch 3.pdfModern Control Engineering Problems Ch 3.pdf
Modern Control Engineering Problems Ch 3.pdf
Mahamad Jawhar
 
New data structures and algorithms for \\post-processing large data sets and ...
New data structures and algorithms for \\post-processing large data sets and ...New data structures and algorithms for \\post-processing large data sets and ...
New data structures and algorithms for \\post-processing large data sets and ...
Alexander Litvinenko
 
Lemh103
Lemh103Lemh103
9.matrices and transformation Further Mathematics Zimbabwe Zimsec Cambridge
9.matrices and transformation   Further Mathematics Zimbabwe Zimsec Cambridge9.matrices and transformation   Further Mathematics Zimbabwe Zimsec Cambridge
9.matrices and transformation Further Mathematics Zimbabwe Zimsec Cambridge
alproelearning
 
Matlab Tutorial
Matlab TutorialMatlab Tutorial
Matlab Tutorial
Ahmad Siddiq
 
Hull White model presentation
Hull White model presentationHull White model presentation
Hull White model presentation
Stephan Chang
 
4 3 algebra of radicals
4 3 algebra of radicals4 3 algebra of radicals
4 3 algebra of radicalsmath123b
 
Matlab Overviiew 2
Matlab Overviiew 2Matlab Overviiew 2
Matlab Overviiew 2
Nazim Naeem
 
36 Matrix Algebra-x.pptx
36 Matrix Algebra-x.pptx36 Matrix Algebra-x.pptx
36 Matrix Algebra-x.pptx
math260
 
final sci lab.pptx
final sci lab.pptxfinal sci lab.pptx
final sci lab.pptx
girish741205
 
Rosalina Apriana - Math Compulsory Grade XI - Matriks
Rosalina Apriana - Math Compulsory Grade XI - MatriksRosalina Apriana - Math Compulsory Grade XI - Matriks
Rosalina Apriana - Math Compulsory Grade XI - Matriks
RosalinaApriana
 
Matematika kelas XI semester 2 - Matriks fun mathematics
Matematika kelas XI semester 2 - Matriks fun mathematicsMatematika kelas XI semester 2 - Matriks fun mathematics
Matematika kelas XI semester 2 - Matriks fun mathematics
RosalinaApriana
 
Unit 6.3
Unit 6.3Unit 6.3
Unit 6.3
Mark Ryder
 
33 parametric equations x
33 parametric equations x33 parametric equations x
33 parametric equations x
math266
 

Similar to Matlab analytical solution of cubic equation (20)

4-Corner Rational Distance Problems
4-Corner Rational Distance Problems4-Corner Rational Distance Problems
4-Corner Rational Distance Problems
 
Matrices
MatricesMatrices
Matrices
 
Matlab
MatlabMatlab
Matlab
 
Modern Control Engineering Problems Ch 3.pdf
Modern Control Engineering Problems Ch 3.pdfModern Control Engineering Problems Ch 3.pdf
Modern Control Engineering Problems Ch 3.pdf
 
bobok
bobokbobok
bobok
 
New data structures and algorithms for \\post-processing large data sets and ...
New data structures and algorithms for \\post-processing large data sets and ...New data structures and algorithms for \\post-processing large data sets and ...
New data structures and algorithms for \\post-processing large data sets and ...
 
Takue
TakueTakue
Takue
 
Lemh103
Lemh103Lemh103
Lemh103
 
9.matrices and transformation Further Mathematics Zimbabwe Zimsec Cambridge
9.matrices and transformation   Further Mathematics Zimbabwe Zimsec Cambridge9.matrices and transformation   Further Mathematics Zimbabwe Zimsec Cambridge
9.matrices and transformation Further Mathematics Zimbabwe Zimsec Cambridge
 
Matlab Tutorial
Matlab TutorialMatlab Tutorial
Matlab Tutorial
 
Hull White model presentation
Hull White model presentationHull White model presentation
Hull White model presentation
 
4 3 algebra of radicals
4 3 algebra of radicals4 3 algebra of radicals
4 3 algebra of radicals
 
Matlab Overviiew 2
Matlab Overviiew 2Matlab Overviiew 2
Matlab Overviiew 2
 
36 Matrix Algebra-x.pptx
36 Matrix Algebra-x.pptx36 Matrix Algebra-x.pptx
36 Matrix Algebra-x.pptx
 
final sci lab.pptx
final sci lab.pptxfinal sci lab.pptx
final sci lab.pptx
 
Mat lab day 1
Mat lab day 1Mat lab day 1
Mat lab day 1
 
Rosalina Apriana - Math Compulsory Grade XI - Matriks
Rosalina Apriana - Math Compulsory Grade XI - MatriksRosalina Apriana - Math Compulsory Grade XI - Matriks
Rosalina Apriana - Math Compulsory Grade XI - Matriks
 
Matematika kelas XI semester 2 - Matriks fun mathematics
Matematika kelas XI semester 2 - Matriks fun mathematicsMatematika kelas XI semester 2 - Matriks fun mathematics
Matematika kelas XI semester 2 - Matriks fun mathematics
 
Unit 6.3
Unit 6.3Unit 6.3
Unit 6.3
 
33 parametric equations x
33 parametric equations x33 parametric equations x
33 parametric equations x
 

Recently uploaded

Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
deeptiverma2406
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
Kartik Tiwari
 

Recently uploaded (20)

Best Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDABest Digital Marketing Institute In NOIDA
Best Digital Marketing Institute In NOIDA
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Chapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdfChapter -12, Antibiotics (One Page Notes).pdf
Chapter -12, Antibiotics (One Page Notes).pdf
 

Matlab analytical solution of cubic equation

  • 1. Analytical Solution Of Cubic Equation In this paper will illustrated how to find roots of cubic equation with formula as following:- Note:- If your equation as following just divide equation on parameter of x 3 (A) .The cubic equation has normally three real roots sometimes all of them different or two of them equal each other and in cases has one real root. Example:- I. Roots II. Roots III. Root CODE OF FUNCTION:- function [ROOT] = CERO(A,B,C) %UNTITLED Summary of this function goes here % Detailed explanation goes here Q=(power(A,2)-3*B)/9; R=(2*power(A,3)-9*A*B+27*C)./54; MM=power(R,2)-power(Q,3); if MM<=0; THET=acos(R./sqrt(power(Q,3))); X1=-(2*sqrt(Q)*cos(THET./3))-A./3; X2=-(2*sqrt(Q)*cos((THET-2*pi)./3))-A./3; X3=-(2*sqrt(Q)*cos((THET+2*pi)./3))-A./3; ROOT=[X1 X2 X3]; else S=-sign(R)*power((abs(R)+sqrt(MM)),1/3); TT=Q./S; X1=S+TT-A./3; ROOT=X1; end end
  • 2. Snapshot of MATLAB Screen:- I Wish You All The Best Good Luck For All