SlideShare a Scribd company logo
1 of 2
Download to read offline
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 (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 ProblemsSara Alvarez
 
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.pdfMahamad 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
 
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 Cambridgealproelearning
 
Hull White model presentation
Hull White model presentationHull White model presentation
Hull White model presentationStephan 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 2Nazim Naeem
 
36 Matrix Algebra-x.pptx
36 Matrix Algebra-x.pptx36 Matrix Algebra-x.pptx
36 Matrix Algebra-x.pptxmath260
 
final sci lab.pptx
final sci lab.pptxfinal sci lab.pptx
final sci lab.pptxgirish741205
 
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 - MatriksRosalinaApriana
 
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 mathematicsRosalinaApriana
 
33 parametric equations x
33 parametric equations x33 parametric equations x
33 parametric equations xmath266
 

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

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 

Recently uploaded (20)

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 

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