<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:12pt"><div><span>Descobri o erro na função. O correto seria:</span></div><div><span><br></span></div><div><span><div>segment_lpl <- function(x,b0,b1,b2,X0,X1){</div><div> (b0+b1*x)*(x<=X0)+</div><div> <b>(b0+b1*X0)</b>*(X0<x & x<X1)+</div><div> (b0+b1*X0-b2*(X1-x))*(x>=X1)</div><div>}</div></span></div><div><br></div><div>Só não entendo o porque que não estou conseguindo convergência, uma vez que estou fornecendo exatamente os valores que o gráfico interativo está fornecendo. Se alguém descobrir, fico grato.</div><div><br></div><div>(S,f,P)</div><div>Allaman</div><div style="background-color:transparent;" align="center"><font style="background-color:transparent;" face="comic sans ms" size="2"><font size="1"><b><br></b></font></font></div><div style="text-align:left;background-color:transparent;"
align="center"><font style="background-color:transparent;"><font face="courier, monaco, monospace, sans-serif" size="2">\begin{signature}</font></font></div><div style="text-align:left;background-color:transparent;" align="center"><font style="background-color:transparent;"><font face="courier, monaco, monospace, sans-serif" size="2"><<>>=</font></font></div><div style="text-align:left;background-color:transparent;" align="center"><font class="Apple-style-span" face="courier, monaco, monospace, sans-serif" size="2">Prof. Dr. Ivan Bezerra Allaman</font></div><div style="text-align:left;background-color:transparent;" align="center"><font class="Apple-style-span" face="courier, monaco, monospace, sans-serif" size="2">Universidade Estadual de Santa Cruz</font></div><div style="text-align:left;background-color:transparent;" align="center"><font class="Apple-style-span" face="courier, monaco, monospace, sans-serif" size="2">Departamento de
Ciências Exatas e Tecnológicas</font></div><div style="text-align:left;background-color:transparent;" align="center"><font class="Apple-style-span" face="courier, monaco, monospace, sans-serif" size="2">Ilhéus/BA - Brasil</font></div><div style="text-align:left;background-color:transparent;" align="center"><font class="Apple-style-span" face="courier, monaco, monospace, sans-serif" size="2">Fone: +55 73 3680-5076</font></div><div style="text-align:left;background-color:transparent;" align="center"><font class="Apple-style-span" face="courier, monaco, monospace, sans-serif" size="2">E-mail: ivanalaman@yahoo.com.br/ivanalaman@gmail.com</font></div><div style="text-align:left;background-color:transparent;" align="center"><font style="background-color:transparent;"><font face="courier, monaco, monospace, sans-serif" size="2">@</font></font></div><div style="text-align:left;background-color:transparent;" align="center"><font
style="background-color:transparent;"><font face="courier, monaco, monospace, sans-serif" size="2">\end{signature}</font></font></div></div></body></html>