Skip to main content
Rewrite
Source Link
m_goldberg
  • 108.7k
  • 16
  • 107
  • 263

Here isConsider the following plot:

Plot[(22500 + T^2/3) \[Phi]^2ϕ^2 + 320 \[Phi]^3ϕ^3 + \[Phi]^4ϕ^4 /. 
  T -> 96.43650760992945`, {\[Phi]ϕ, -200, 20}]

I would like to find the value of $\Phi<0$ and $T>0$ such that weto obtain the first minimum of the above function.

These two values can be obtained with

FindRoot[
  {(22500 + T^2/3) \[Phi]^2ϕ^2 + 320 \[Phi]^3ϕ^3 + \[Phi]^4ϕ^4 == 0 , 
   D[(22500 + T^2/3) \[Phi]^2ϕ^2 + 320 \[Phi]^3ϕ^3 + \[Phi]^4ϕ^4, {\[Phi]ϕ, 
     1}] == 0}, 
  {{\[Phi]ϕ, -200}, {T, 1}}]

which yields

{{$\Phi \rightarrow -160.$., $T \rightarrow 96.4365$}}

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.
{ϕ -> -160., T -> 96.4365}

However, I would like to obtain it with NSolve but it does not work:

NSolve[
  {(22500 + T^2/3) \[Phi]^2ϕ^2 + 320 \[Phi]^3ϕ^3 + \[Phi]^4ϕ^4 == 0, 
   D[(22500 + T^2/3) \[Phi]^2ϕ^2 + 320 \[Phi]^3ϕ^3 + \[Phi]^4ϕ^4, {\[Phi]ϕ, 
     1}] == 0}, 
  {\[Phi]ϕ, T}]

which gives

NSolve::infsolns: Infinite solution set has dimension at least 1. Returning intersection of solutions with $-\frac{92291 T}{87992}-\frac{121001 \Phi}{175984} == 1$.

and

{{$\Phi \rightarrow 0$., $T \rightarrow -0.953419$}}

NSolve::infsolns: Infinite solution set has dimension at least 1. Returning intersection of solutions with -((92291 T)/87992)-(121001 [Phi])/175984 == 1.
{{ϕ -> 0., T -> -0.953419}}

as a solution, which is wrong obviously wrong.

Here is the following plot:

Plot[(22500 + T^2/3) \[Phi]^2 + 320 \[Phi]^3 + \[Phi]^4 /. 
  T -> 96.43650760992945`, {\[Phi], -200, 20}]

I would like to find the value of $\Phi<0$ and $T>0$ such that we obtain the first minimum of the above function.

These two values can be obtained with

FindRoot[{(22500 + T^2/3) \[Phi]^2 + 320 \[Phi]^3 + \[Phi]^4 == 0 , 
  D[(22500 + T^2/3) \[Phi]^2 + 320 \[Phi]^3 + \[Phi]^4, {\[Phi], 
     1}] == 0}, {{\[Phi], -200}, {T, 1}}]

which yields

{{$\Phi \rightarrow -160.$., $T \rightarrow 96.4365$}}

However I would like to obtain it with NSolve but it does not work:

NSolve[{(22500 + T^2/3) \[Phi]^2 + 320 \[Phi]^3 + \[Phi]^4 == 0, 
  D[(22500 + T^2/3) \[Phi]^2 + 320 \[Phi]^3 + \[Phi]^4, {\[Phi], 
     1}] == 0}, {\[Phi], T}]

which gives

NSolve::infsolns: Infinite solution set has dimension at least 1. Returning intersection of solutions with $-\frac{92291 T}{87992}-\frac{121001 \Phi}{175984} == 1$.

and

{{$\Phi \rightarrow 0$., $T \rightarrow -0.953419$}}

as a solution, which is wrong obviously.

Consider the following plot:

Plot[(22500 + T^2/3) ϕ^2 + 320 ϕ^3 + ϕ^4 /. T -> 96.43650760992945`, {ϕ, -200, 20}]

I would like to find the value of $\Phi<0$ and $T>0$ to obtain the first minimum of the above function.

These two values can be obtained with

FindRoot[
  {(22500 + T^2/3) ϕ^2 + 320 ϕ^3 + ϕ^4 == 0 , 
   D[(22500 + T^2/3) ϕ^2 + 320 ϕ^3 + ϕ^4, {ϕ, 1}] == 0}, 
  {{ϕ, -200}, {T, 1}}]

which yields

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.
{ϕ -> -160., T -> 96.4365}

However, I would like to obtain it with NSolve but it does not work:

NSolve[
  {(22500 + T^2/3) ϕ^2 + 320 ϕ^3 + ϕ^4 == 0, 
   D[(22500 + T^2/3) ϕ^2 + 320 ϕ^3 + ϕ^4, {ϕ, 1}] == 0}, 
  {ϕ, T}]

which gives

NSolve::infsolns: Infinite solution set has dimension at least 1. Returning intersection of solutions with -((92291 T)/87992)-(121001 [Phi])/175984 == 1.
{{ϕ -> 0., T -> -0.953419}}

as a solution, which is obviously wrong.

Source Link

NSolve an equation and its first derivative

Here is the following plot:

Plot[(22500 + T^2/3) \[Phi]^2 + 320 \[Phi]^3 + \[Phi]^4 /. 
  T -> 96.43650760992945`, {\[Phi], -200, 20}]

I would like to find the value of $\Phi<0$ and $T>0$ such that we obtain the first minimum of the above function.

These two values can be obtained with

FindRoot[{(22500 + T^2/3) \[Phi]^2 + 320 \[Phi]^3 + \[Phi]^4 == 0 , 
  D[(22500 + T^2/3) \[Phi]^2 + 320 \[Phi]^3 + \[Phi]^4, {\[Phi], 
     1}] == 0}, {{\[Phi], -200}, {T, 1}}]

which yields

{{$\Phi \rightarrow -160.$., $T \rightarrow 96.4365$}}

However I would like to obtain it with NSolve but it does not work:

NSolve[{(22500 + T^2/3) \[Phi]^2 + 320 \[Phi]^3 + \[Phi]^4 == 0, 
  D[(22500 + T^2/3) \[Phi]^2 + 320 \[Phi]^3 + \[Phi]^4, {\[Phi], 
     1}] == 0}, {\[Phi], T}]

which gives

NSolve::infsolns: Infinite solution set has dimension at least 1. Returning intersection of solutions with $-\frac{92291 T}{87992}-\frac{121001 \Phi}{175984} == 1$.

and

{{$\Phi \rightarrow 0$., $T \rightarrow -0.953419$}}

as a solution, which is wrong obviously.