Message Boards Message Boards

GROUPS:

Why doesn't Assuming or Assumption work?

Posted 9 months ago
1545 Views
|
3 Replies
|
2 Total Likes
|
In[205]:= eq1 = 
         Assuming[\[Lambda] \[Element] Reals, 
          DSolve[{(\[Phi]^\[Prime]\[Prime])[r1]/\[Phi][r1] == -\[Lambda]^2, 
            k \[Phi][0] == Derivative[1][\[Phi]][0], 
            k \[Phi][l] == Derivative[1][\[Phi]][l]}, \[Phi][r1], r1]]

    Out[205]= {{\[Phi][r1] -> 0}}

    In[206]:= eq2 = 
     Assuming[\[Lambda] \[Element] Reals, 
      DSolve[{(\[Phi]^\[Prime]\[Prime])[r1]/\[Phi][r1] == \[Lambda]^2, 
        k \[Phi][0] == Derivative[1][\[Phi]][0], 
        k \[Phi][l] == Derivative[1][\[Phi]][l]}, \[Phi][r1], r1]]

    Out[206]= {{\[Phi][r1] -> 0}}

    In[207]:= eq3 = 
     DSolve[{(\[Phi]^\[Prime]\[Prime])[r1]/\[Phi][r1] == -\[Lambda]^2, 
       k \[Phi][0] == Derivative[1][\[Phi]][0], 
       k \[Phi][l] == Derivative[1][\[Phi]][l]}, \[Phi][r1], r1, 
      Assumptions -> \[Lambda] \[Element] Reals]

    Out[207]= {{\[Phi][r1] -> 0}}

    In[208]:= eq4 = 
     DSolve[{(\[Phi]^\[Prime]\[Prime])[r1]/\[Phi][r1] == \[Lambda]^2, 
       k \[Phi][0] == Derivative[1][\[Phi]][0], 
       k \[Phi][l] == Derivative[1][\[Phi]][l]}, \[Phi][r1], r1, 
      Assumptions -> \[Lambda] \[Element] Reals]

    Out[208]= {{\[Phi][r1] -> 0}}

In the 4 pieces of codes above, there should appear a solution as c1cos(lambda x) + c2sin(lambda x).

POSTED BY: Jacques Ou
3 Replies
Posted 9 months ago

I think that the reason is that k is undetermined and Mathematica doesn't know how to deal with k.

POSTED BY: Updating Name

I get a sensible result this way:

DSolve[{\[Phi]''[r1] == -\[Lambda]^2 \[Phi][r1],
  k \[Phi][0] == \[Phi]'[0],
  k \[Phi][l] == \[Phi]'[l]},
 \[Phi], r1]
POSTED BY: Gianluca Gorni
Posted 6 months ago

Yes, it works, but doesn't include another root,

\lambda =-k^2
POSTED BY: Jacques Ou
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract