Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.4K Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Avoid different solutions of two equivalent systems of equations?

Posted 6 years ago

Consider the following code:

In[401]:= eq1 = DSolve[{ 
    \!\(\*SuperscriptBox[\(C20\), 
    TagBox[
    RowBox[{"(", 
    RowBox[{"2", ",", "0"}], ")"}],
    Derivative],
    MultilineFunction->None]\)[R2, T] == 0, (Jrm R0^2 + Rr C20[0, T]) 
    \!\(\*SuperscriptBox[\(C20\), 
    TagBox[
    RowBox[{"(", 
    RowBox[{"1", ",", "0"}], ")"}],
    Derivative],
    MultilineFunction->None]\)[0, T] == 0}, C20, {R2, T}, 
      Assumptions -> {T > 0}, GeneratedParameters -> F1]



Out[401]= {{C20 -> Function[{R2, T}, F1[1][T]]}, {C20 -> 
   Function[{R2, T}, (-Jrm R0^2 + R2 Rr F1[2][T])/Rr]}}

In[402]:= eq2 = DSolve[{ -2 R0 
\!\(\*SuperscriptBox[\(C20\), 
TagBox[
RowBox[{"(", 
RowBox[{"2", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[R2, T] == 0, 4 R0 (Jrm R0^2 + Rr C20[0, T]) 
\!\(\*SuperscriptBox[\(C20\), 
TagBox[
RowBox[{"(", 
RowBox[{"1", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[0, T] == 0}, C20, {R2, T}, 
  Assumptions -> {T > 0}, GeneratedParameters -> F1]

Out[402]= {{C20 -> Function[{R2, T}, -((Jrm R0^2)/Rr)]}}

eq1 and eq2 are equivalent, but their solutions are different. Why?

POSTED BY: Jacques Ou
3 Replies

The first solution comes from setting (Jrm R0^2 + Rr C20[0, T]) == 0. The second solution is a special case of the first, with F1[2][T]=0. They both miss the solution C20 -> Function[{R2,T}, F1[2][T]] that comes from setting Derivative[1,0][C20][0, T] == 0.

POSTED BY: Gianluca Gorni
Posted 6 years ago

The unique difference between 2 systems of equations is the constant coefficients. The possible problem is that one is taken as PDEs and the other as ODEs.

eq1 = DSolve[{ 

\!\(\*SuperscriptBox[\(C20\), 
TagBox[
RowBox[{"(", 
RowBox[{"2", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[R2, T] == 0, (Jrm R0^2 + Rr C20[0, T])  
\!\(\*SuperscriptBox[\(C20\), 
TagBox[
RowBox[{"(", 
RowBox[{"1", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[0, T] == 0}, C20, {R2, T}, 
        Assumptions -> {T > 0}, GeneratedParameters -> F1]


(*{{C20\[Rule]Function[{R2,T},F1[1][T]]},{C20\[Rule]Function[{R2,T},(-\
Jrm R0^2+R2 Rr F1[2][T])/Rr]}}*)

eq2 = DSolve[{ 
    -2  
\!\(\*SuperscriptBox[\(C20\), 
TagBox[
RowBox[{"(", 
RowBox[{"2", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[R2, T] == 0, 
   4 (Jrm R0^2 + Rr C20[0, T])  
\!\(\*SuperscriptBox[\(C20\), 
TagBox[
RowBox[{"(", 
RowBox[{"1", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[0, T] == 0}, C20, {R2, T}, 
        Assumptions -> {T > 0}, GeneratedParameters -> F1]


(*{{C20\[Rule]Function[{R2,T},-((Jrm R0^2)/Rr)]}}*)

eq3 = DSolve[{
    -2 R0  
\!\(\*SuperscriptBox[\(C20\), 
TagBox[
RowBox[{"(", 
RowBox[{"2", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[R2, T] == 0, 4 R0 (Jrm R0^2 + Rr C20[0, T]) 
\!\(\*SuperscriptBox[\(C20\), 
TagBox[
RowBox[{"(", 
RowBox[{"1", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[0, T] == 0}, C20, {R2, T}, 
    Assumptions -> {T > 0}, GeneratedParameters -> F1]

(*{{C20\[Rule]Function[{R2,T},-((Jrm R0^2)/Rr)]}}*)
POSTED BY: Jacques Ou

eq1 and eq2 are not equivalent,not the same.Mathematica gives a correct solution.

Check for eq1:

 eq1 = DSolve[{Derivative[2, 0][C20][R2, T] == 
     0, (Jrm*R0^2 + Rr*C20[0, T])*Derivative[1, 0][C20][0, T] == 0}, 
   C20, {R2, T}, 
         Assumptions -> {T > 0}, GeneratedParameters -> F1]

Derivative[2, 0][C20][R2, T] == 0 /. eq1
(* {True, True}*)
(Jrm*R0^2 + Rr*C20[0, T])*Derivative[1, 0][C20][0, T] == 0 /. eq1
(* {True, True}*)

Check for eq2:

eq2 = DSolve[{-2*R0*Derivative[2, 0][C20][R2, T] == 0, 
4*R0*(Jrm*R0^2 + Rr*C20[0, T])*Derivative[1, 0][C20][0, T] == 0}, 
 C20, {R2, T}, 
 Assumptions -> {T > 0}, GeneratedParameters -> F1]

 -2*R0*Derivative[2, 0][C20][R2, T] == 0 /. eq2
 (*True*)
  4*R0*(Jrm*R0^2 + Rr*C20[0, T])*Derivative[1, 0][C20][0, T] == 0 /. eq2
 (*True*)
POSTED BY: Mariusz Iwaniuk
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard