kill(all)$

maxima : graphics for Muller method (algo),version 1.0
peter.vlasschaert@gmail.com, 01/08/2020

load packages ,option
=================

load(lrats)$

ratprint:false$

syntax : plot2d(['parametric, x(t), y(t), [t, 0, tend]], .....)

parametric lines (blue,red,green)
=============

q1a:['parametric, 4.5, 0+t, [t, 0, 20.625]];

q1b:['parametric, 5, 0+t, [t, 0, 48]];

q1c:['parametric, 5.5, 0+t, [t, 0, 82.875]];

parabolic equation(black), g(x),a,b,c (see code implimentation)
================================================
Where you get the data : coef , 'parabolic equation':
answer : see code implimentation
{62.5,15,48,xr } in ' q3'

ref :value

xr:5;
x2:5;

→  below : ref value.

x0:4.5;

→  above : ref value.

x1:5.5;

q3:15*(x-xr)^2+62.25*(x-xr)+48;

q3a:lratsubst([x=x0],q3),numer;

q3b:lratsubst([x=x2],q3),numer;

q3c:lratsubst([x=x1],q3),numer;

calculation of height of intersection ,see above ,'tend  value'
with respect  to→ {q1a,q1b,q1c}   = result , used below.

nonlinear equation(purple), f(x)
=======================

q4:x^3-13*x-12;

plot equation
==========
purple :                   nonlinear , 'q4'
black  :                    parabolic equation , 'q3'
parametric values : x =4.5,5,5.5 , x = blue,red,green
                                  →  y = q3a,q3b,q3c

wxplot2d([q1a,q1b,q1c,q3,q4],[x,3,6],[y,-40,100],[nticks,200]
,[gnuplot_preamble,"set size ratio 1;"],[box,true],[axes,true],[legend,false])$

from  the graph : appoximate root of the nonlinear equation by : x =4

check : ?  use:q4

→ nonlinear equation

q5a:lratsubst([x=4],q4);

→ parabolic equation (you can't use this result)

q5a:lratsubst([x=4],q3);

check: ?  Maxima

q5c:allroots(q4);

→ graph : nonlinear equations,
domain : -5 ≤ x ≤ 5.5

wxplot2d([q4,q3],[x,-5.5,5.5],[y,-40,100],[nticks,200]
,[gnuplot_preamble,"set size ratio 1;"],[box,true],
    [axes,true],[legend,false]);

more detail : zoom around the solution (x=4)

wxplot2d([q4,q3],[x,3,5.0],[y,-20,20],[nticks,200]
,[gnuplot_preamble,"set size ratio 1;"],[box,true],
    [axes,true],[legend,false]);

solution : q5a, why .

answer :three real roots for 'q4', blue curve (nonlinear eq.) , 'q3' , parabolic curve.

rem : when you don't know nothing about the physics , try to draw  a graph in
          the domain you want to consider the physical aspects.' = distillation'
===============================================================
simpler method : to draw straight line through two points in this method three points
                              are needed.
===============================================================