Group Abstract Group Abstract

Message Boards Message Boards

0
|
8.7K Views
|
5 Replies
|
4 Total Likes
View groups...
Share
Share this post:

Solve system of 3 equations using "Solve"

Posted 5 years ago

I am facing a problem in solving a system of three equations for three unknown parameters. In order to have a clear understanding of the issue, I have given a detailed description of the origin of the said equations. The equations arise from a differential equation and its boundary conditions from one of the research articles as:

$\omega^2 L C \frac{d^2v(x)}{dx^2} + v(x) - V_{cc}+ V_R \sin(x+\phi) = 0$

Whose General solution is given in the normalized form as

$\frac{v(x)}{V_{cc}}=C_1\cos qx+C_2\sin qx+1+ \frac{q^2}{1-q^2}.\frac{V_R}{V_{cc}}\sin (x+\phi)$

Where

$q=\frac{1}{\omega\sqrt{LC}}$

and

$\omega C\frac{d v(x)}{d x} =i_{c}(x)$

And the boundary conditions are:

$i_{c}(\pi)=\frac{\pi V_{cc}-2V_R \cos\phi}{\omega L} $

and

$v(\pi)=0$

So once I apply boundary conditions I have these two following equations

$0=C_1\cos q\pi+C_2\sin q\pi+1- \frac{q^2}{1-q^2}.\frac{V_R}{V_{cc}}\sin (\phi)\\ i_{c}(\pi)=\frac{\pi V_{cc}-2V_R \cos\phi}{\omega L} = \omega C \begin{bmatrix}-C_1q \sin(q\pi)+C_2q \cos(q\pi)+\frac{q^2}{1-q^2}V_R\cos(\phi) \end{bmatrix}_{x = \pi}$

After substituting the boundary conditions I am solving the above two equations for C1 and C2 constants using "Solve " in Wolfram Mathematica. and I obtain the following

$C_1= -\cos(q\pi)-q \pi \sin(q\pi)+(\frac{q}{1-q^2})\frac{V_R}{V_{cc}} \times\begin{bmatrix} q \cos(q\pi) \sin \phi +(1-2q^2) \sin(q\pi) \cos \phi \end{bmatrix}$

$C_2= -\sin(q\pi)+q \pi \cos(q\pi)+(\frac{q}{1-q^2})\frac{V_R}{V_{cc}} \times \begin{bmatrix} q \sin(q\pi) \sin \phi -(1-2q^2) \cos(q\pi) \cos \phi \end{bmatrix}$

The value of C1 and C2 is back substituted in v(x) of the general solution of the differential equation obtained above. Then I have set of three equations as follows

$V_R= -\frac{1}{\pi} \int_{0}^{2\pi} v(x)\sin(x+\phi)dx$

$\begin{bmatrix}v(x)\end{bmatrix}_{x=2\pi}=0$ $$\begin{bmatrix}\frac{d v(x)}{d x}\end{bmatrix}_{x=2\pi}=0$$

I am trying to solve the above three equations for three unknown parameters $$\phi,q, V_R$$ whereas Vcc is a constant in my equations. The three unknown parameters are reported by the authors of the research article as

$\phi = -41.614\\ q=1.607\\ V_R= 0.9253 \times V_{cc}$

I am solving the above set of three equations using Solve in Wolfram Mathematica but I get the error message as Solve::nsmet: This system cannot be solved with the methods available to Solve. >>. The complete notebook code that I use in Mathematica to solve it is given below

Clear[x, y, A, q, b, c, ysol, ysolsimp]
A = \[Omega]^2 *L*C 
b = Vcc
c = VR
eqn = A* y''[x] + y[x] - b + c *Sin[x + phi] == 0
Solut = DSolve[eqn, y, x]
ysol = y /. First@DSolve[eqn, y, x] 
ysolsimp =  ysol[x] /. {C[1] -> c1, C[2] -> c2 , (x/(Sqrt[C]* Sqrt[L]* \[Omega])) -> q*x } // 
  FullSimplify

diff = D[ysolsimp, x]
ic = \[Omega]*C*diff
icp = \[Omega]*C*diff /. x -> Pi
icL = (Pi*Vcc - 2*VR*Cos[phi])/(\[Omega]*L)
icp == icL

eq1 = (icp == icL)
eq2 = (ysol[x] /. {C[1] -> c1, C[2] -> c2, x -> \[Pi]} /. (\[Pi]/(  Sqrt[C]* Sqrt[L]* \[Omega])) -> q*\[Pi] // FullSimplify) == 0

soleq1 = Solve[ eq1 && eq2, {c1, c2}] /. { (\[Pi]/(Sqrt[C]* Sqrt[L]* \[Omega])) -> q*\[Pi] } // FullSimplify

c1 = c1 /. soleq1
c2 = c2 /. soleq1

inty = \!\( \*SubsuperscriptBox[\(\[Integral]\), \(0\), \(2  \[Pi]\)]\(ysolsimp*\ Sin[x + phi] \DifferentialD]x\)\) // FullSimplify

fourintegral = (-1/\[Pi])*\!\( \*SubsuperscriptBox[\(\[Integral]\), \(0\), \(2  \[Pi]\)]\(ysolsimp*\ Sin[x + phi] \[DifferentialD]x\)\) // FullSimplify

eq4 = (fourintegral == VR)

eq5 = ysol[x] /. {C[1] -> c1, C[2] -> c2 , (x/(Sqrt[C]* Sqrt[L]* \[Omega])) -> q*x , x -> 2 \[Pi]} // FullSimplify


eq5b = (eq5 == 0)
eq6 = D[ysolsimp, x]
eq6b = eq6 /. x -> 2*\[Pi]
eq6c = eq6b == 0
Solve[{eq4 , eq5b , eq6c}, {phi, q, VR}]

Solve::nsmet: This system cannot be solved with the methods available to Solve. >>

The complete Wolfram Mathematica Notebook is also attached to this post. Kindly help me to debug the error. How can I get the same answer as that of the research article? Thanking you.

Attachments:
POSTED BY: Liyaqat Nazir
5 Replies
Posted 5 years ago
Attachments:
POSTED BY: Liyaqat Nazir
Posted 5 years ago

Greetings Liyaqat,

Before we work on solving this problem, have you checked that the answer provided is correct? I tried to verify it and assuming everything else is correct, I find that

Vcc == 0 && -1. C L \[Omega] + C^2 L^2 \[Omega]^3 != 0

This means that Vcc must be zero when you say it is assumed to be constant. Is this an expected result?

I attached some the edits I made to produce this result.

qsol = 1.607;
phisol = -41.614;
VRsol = 0.9253*Vcc;

eqn1 = eq4 /. {q -> qsol, phi -> phisol, VR -> VRsol} // FullSimplify
eqn2 = eq5b /. {q -> qsol, phi -> phisol, VR -> VRsol} // 
  FullSimplify
eqn3 = eq6c /. {q -> qsol, phi -> phisol, VR -> VRsol} // FullSimplify


Reduce[{eqn1, eqn2, eqn3}]
Attachments:
POSTED BY: 0 0
Posted 5 years ago

I have posted a simpler form of this post in matematica.stackexchange forum the link for that is Stackexchange

POSTED BY: Liyaqat Nazir
Posted 5 years ago

Thank you Daniel for your reply. I had some formatting issues in the post. I have corrected the post now in proper format for its clarity. I hope the question is clear now.

POSTED BY: Liyaqat Nazir

You can make the system algebraic using TrigExpand and converting the cosines and sines to new variables e.g. Cos[phi]->cphi,... Also add the defining relations e.g. cphi^2+sphi^2==1. This will give an algebraic system in the new variables that might or might not be tractable, but at least it can be handled algorithmically (that is, a method is implemented that covers this class).

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard