Wolfram mathematica 如何在mathematica中检查两条曲线是否相交

Wolfram mathematica 如何在mathematica中检查两条曲线是否相交,wolfram-mathematica,intersection,curves,Wolfram Mathematica,Intersection,Curves,我有一组参数曲线和一条参考曲线,我想看看哪些曲线与参考曲线相交 function1[x_,a_]:=x^2+a function2[x]:=1 例如,假设函数1是参数曲线,函数2是参考曲线 function1[x_,a_]:=x^2+a function2[x]:=1 如何“以干净的方式”知道相交函数2用于哪个函数1。我尝试使用FindRoot: In:= FindRoot[function1[x, 1] == function2[x], {x, 1}] Out= {x -> 1.}

我有一组参数曲线和一条参考曲线,我想看看哪些曲线与参考曲线相交

function1[x_,a_]:=x^2+a
function2[x]:=1
例如,假设函数1是参数曲线,函数2是参考曲线

function1[x_,a_]:=x^2+a
function2[x]:=1
如何“以干净的方式”知道相交函数2用于哪个函数1。我尝试使用FindRoot:

In:= FindRoot[function1[x, 1] == function2[x], {x, 1}]
Out= {x -> 1.}
它在这种情况下运行良好,但如果不起作用,Mathematica会给我提供一个荒谬的值,并显示一条错误消息

In[485]:= FindRoot[function1[x, 4] == function2[x], {x, 1}]

"During evaluation of In[485]:= FindRoot::lstol: The line search decreased the step size to
within tolerance specified by AccuracyGoal and PrecisionGoal but was unable to find a  
sufficient decrease in the merit function. You may need more than MachinePrecision
digits of working precision to meet these tolerances. >>"

Out[485]= {x -> 3.09187*10^-6}

我希望得到一个“真”或“假”的陈述,而不是一个荒谬的值(如果它们不相交)或确切的值(如果它们相交)。知道如何实现这一点吗?

请参见Quiet[]关闭警告,并将得到的任何结果插入公式中进行测试。对于更多的讨论,建议您将其应用到MadiaTaC.StAcExchange。com,并提供一个真实的例子。查看Real[Frime1[x,a]=Fiels2[x],{x}],并考虑如何使用该结果来获得您想要看的东西:并考虑在该站点上问将来的问题。