Message Boards Message Boards

Finding the constants of the coupled differential equation

Posted 1 year ago

I am trying to solve the coupled differential equation, but i am having trouble finding the constants. I have successfully found the expressions for u[x], p[x] and [Mu][x]. and use the Solve function and the boundary conditions given by eqn 3-7 to find the values of the constants. the result is empty, does that mean the boundary conditions are insufficient, or is there some other reason? Also, could anyone suggest how to simplify the code that I wrote, it looks a bit messy :(

Attachments:
POSTED BY: Anand Mathew
2 Replies
Posted 1 year ago

Thanks a lot. This helped me understand my mistake.

POSTED BY: Anand Mathew

I would simplify your code this way, if I have guessed right what you meant:

Clear["Global`*"]
eqn1 = \[Tau]*p''[x] - a*p[x] + \[Rho]*\[Mu]'[x] == 0;
eqn2 = \[Mu]''[x] + \[Delta]*
     p'[x] + \[Nu]*\[Mu][x] - \[Nu]*\[Mu]hat == 0;
{p, \[Mu]} = DSolveValue[{eqn1, eqn2}, {p, \[Mu]}, x];
u = DSolveValue[
   u'[x] - (1/\[Zeta])*(\[Sigma] - 
        h*p'[x] + (\[Alpha]/\[Beta])*\[Mu][
          x] - (\[Alpha]/\[Beta])*\[Mu]hat) == 0, u, x];
eqn3 = h*u'[(w/2)] + b*p'[(w/2)] == 0;
eqn4 = h*u'[-(w/2)] + b*p'[-(w/2)] == 0;
eqn5 = u[0] == 0;
eqn6 = \[Mu][(w/2)] == \[Mu]1;
eqn7 = \[Mu][-(w/2)] == \[Mu]0;
Solve[{eqn3, eqn4, eqn5, eqn6, eqn7}, {C[5], C[4], C[3], C[2], C[1]}]

I didn't wait for the last equation to give an answer, it took too long. The full system is linear in the unknowns, but it has very complicated coefficients.

I only tried with some numerical values for the parameters:

values = {\[Tau] -> 1, 
   a -> 1, \[Rho] -> 2, \[Delta] -> 1, \[Nu] -> 2, \[Mu]hat -> 
    1, \[Zeta] -> 1, \[Sigma] -> 1, 
   h -> 1, \[Alpha] -> 1, \[Beta] -> 1, b -> 1, 
   w -> 1, \[Mu]0 -> \[Mu]0, \[Mu]1 -> \[Mu]1};
eqs = Collect[{eqn3, eqn4, eqn5, eqn6, eqn7} /. values, C[_], Simplify]
{knowns, mat} = CoefficientArrays[eqs, Array[C, 5]]
Det[mat]
eqs // N // Simplify // Chop
Solve[eqs, Array[C, 5]]

In this case the coefficient matrix has zero determinant. No solution exists.

For other values of the parameters the derterminant is nonzero and a solution exists:

values = {\[Tau] -> 1, 
   a -> 1, \[Rho] -> 2, \[Delta] -> 1, \[Nu] -> 1, \[Mu]hat -> 
    1, \[Zeta] -> 1, \[Sigma] -> 1, 
   h -> 1, \[Alpha] -> 1, \[Beta] -> 1, b -> -1, 
   w -> 3, \[Mu]0 -> \[Mu]0, \[Mu]1 -> \[Mu]1};
eqs = Collect[{eqn3, eqn4, eqn5, eqn6, eqn7} /. values, C[_], 
   Simplify];
{knowns, mat} = CoefficientArrays[eqs, Array[C, 5]]
Det[mat] // N
eqs // N // Simplify // Chop
Solve[eqs, Array[C, 5]]
POSTED BY: Gianluca Gorni
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