how to solve nonlinear equations using boundary conditions?
Show older comments
Hi all,
I have two sets of equation.
m_c_theta0=(m_c0-1/M+1)*cos(theta0)+j_L0*sin(theta0)+1/M-1;
j_L_theta0=(-m_c0+1/M-1)*sin(theta0)+j_L0*cos(theta0);
j_M0=j_L_theta0-l*theta0;
m_m_theta0=1;
m_c_gama=(m_c_theta0-1/M-1)*cos(gama-theta0)...
+j_L_theta0*sin(gama-theta0)+1/M+1;
j_L_gama=(-m_c_theta0+1/M+1)*sin(gama-theta0) ...
+j_L_theta0*cos(gama-theta0);
j_M_gama=j_L_theta0-l*(gama-theta0);
m_m_gama=-1;
boundary conditions are
[ j_L_gama+x(1); %curernt
m_c_gama+x(2); %voltage
j_M0+j_M_gama;
m_m_theta0+1;
];
where,
l=0.2, F=0.5:0.1:1.5; gama=pi/F;
I need to find the initial,
j_L0=x(1);
m_c0=x(2);
theta0=x(3);
M=x(4);
for above F range and plot(F,M)
I want to do it by using fsolve.
can anyone please help?
8 Comments
safisay
on 11 Dec 2017
Walter Roberson
on 11 Dec 2017
How are those boundary conditions to be interpreted? Is there an implicit "= 0" on each one? So j_L_gama+x(1) = 0, m_c_gama+x(2)=0, and so on? If so then the equation
m_m_theta0=1;
contradicts m_m_theta0+1 = 0
safisay
on 11 Dec 2017
Edited: Walter Roberson
on 11 Dec 2017
Walter Roberson
on 11 Dec 2017
If I ignore m_m_theta0+1=0 as a boundary condition in favour of the explicitly stated m_m_theta0=1 then I appear to derive two formulas for M from the equations:
M = 10*F*(sin((1/2)*(10*F*j_M_gama-Pi)/F)+sin((1/2)*(10*F*j_M_gama+Pi)/F))/(10*F*(m_c_theta0-1)*sin((1/2)*(10*F*j_M_gama-Pi)/F)+Pi*cos((1/2)*(10*F*j_M_gama-Pi)/F)+10*F*(m_c_theta0+1)*sin((1/2)*(10*F*j_M_gama+Pi)/F)+cos((1/2)*(10*F*j_M_gama+Pi)/F)*Pi)
M = 10*F*(cos((1/2)*(10*F*j_M_gama-Pi)/F)+cos((1/2)*(10*F*j_M_gama+Pi)/F)-2)/(10*F*(m_c_theta0-1)*cos((1/2)*(10*F*j_M_gama-Pi)/F)-Pi*sin((1/2)*(10*F*j_M_gama-Pi)/F)+10*F*(m_c_theta0+1)*cos((1/2)*(10*F*j_M_gama+Pi)/F)-sin((1/2)*(10*F*j_M_gama+Pi)/F)*Pi)
provided that I assume all quantities are real-valued.
At one point an equation seems to fall out that
j_M_gama = 2*j_L_theta0-Pi/(5*F)+j_M_gama
which implies that 2*j_L_theta0 = Pi/(5*F)
If the task is to rewrite all of the equations in terms of j_L0, m_c0, theta0, M and F then I am not sure that is possible, but I have not gone through to rigorously check.
Walter Roberson
on 11 Dec 2017
The value of m_m_theta0 does not matter to the code, as you never use the value.
"Is it possible to find the solutions numerically using fsolve rather than finding a symbolic equation?"
I would need to go back through my steps, but I do not think this can be done without there either being more equations or at least one variable (two, more likely) having been assigned a numeric value. The number of equations effectively usable for solving appears to be less than the number of variables to be solved for.
safisay
on 11 Dec 2017
Accepted Answer
More Answers (0)
Categories
Find more on Solver Outputs and Iterative Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!