1

一連のパラメトリック カーブと参照カーブがあり、どれが参照カーブと交差するかを確認したいと考えています。

たとえば、function1 がパラメトリック カーブで、function 2 が参照カーブであるとします。

function1[x_,a_]:=x^2+a
function2[x]:=1

どの function1 がどの function2 と「きれいな方法で」交差するかを知るにはどうすればよいですか。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}

不条理な値 (交差しない場合) または正確な値 (交差する場合) の代わりに、「True」または「False」ステートメントを取得したいと考えています。これを実装する方法はありますか?

4

0 に答える 0