baharm31

65 Reputation

5 Badges

11 years, 95 days

MaplePrimes Activity


These are replies submitted by baharm31

@nm I only copied part of my code and this ode is part of a bigger problem, that is why the equation is not defined based on the parameters. I try to do add the parameters when asking questions next time.

How can I solve it numerically? If I add numeric I get an error.

Thanks,

 

 

 

 

@tomleslie Thank you for sharing this and looking into the problem. combine() is needed to include all terms.

In this case if you change j=1..5,2 (where the number of equations and unknown variables are same), my computer cannot evaluate the unknown variables and it is stuck as evaluating. Previously I tried to use fsolve( [Equations], {variables}) and I could find the variables when the number of equations and variables was the same. I know that there is a solution (which is not zero) because I have solved this with another program numerically.

I guess the solver is not correct and I also found that if I use Digits:=5, 10, 20 when I use fsolve() I get different solutions, which means the system might have several solutions close together.

@rlopez The equations are independent and I just read about the Least Squares solution and I think it would help to find at least if there is any solution, which might not be exact.

@Carl Love No that does not need Maple to solve it.

 

 

@acer Thanks for your suggestions. I have attached a file IssueWith-fsolve.mw, which shows the problem.

Regards,

Baharm31

 

@dharr thank you for looking into it, but if the function is A*x^2+B/x then it is not simple anymore. My issue is that the main function has got certain complexity that it is not easy to expand the trigonometric function and find the coefficient of cos in this case. I want to find the best fit for functionx to allow me to replace x by a series of cosine and be able to find the coefficients.

 

Thnaks,

Baharm31

@Kitonum I am looking for an analytical expression.

Thanks,

Baharm31

 

@baharm31 @Christian Wolinski I understand now, I have the simple relation between p and q as the third equation.

Thanks,

Baharm31

@Christian Wolinski Thanks, I was trying this but I am still struggling, could you please write more how you get p and q?

Thanks,

Baharm31

@Axel Vogt Thanks for your response, I kind of understand what you are trying to say. If we eliminate for p we get an expression for p and q but how can this give me p and q as a function of other parameters? I would like to get something like p= X and q=Y and X and Y are a function of system parameters. If I apply your elimination I get

[{p = R__n*q/(gamma__1*omega__n)}, {(16*((1/4)*(e^2*eta^2+3*e*eta*omega__n+(5/2)*omega__n^2)*(e^2*eta^2+7*e*eta*omega__n+(29/2)*omega__n^2)*L__1^2+omega__n^4*R))*q*C*gamma__1}]

I guess there is a way to use the second expression to find q. In this case, q is zero. Can you please explain more?

Regards,

Baharm31

@Kitonum Thanks for the reply

@vv Thaks. It was the correct answer. If I add c01=1, c12=1, and c02=1 then the dsolve cannot find the solution. Do I need to do something extra if I add the C matrix?

Baharm31

 

@Mariusz Iwaniuk How do you know about this?

Thanks for answering.

Bahar

 

This is how you plot it but do you need exactly 50 points? You can decide the region for Lambda values in your plot by view:

plot(P, style = point, symbol = diamond, color = black, symbolsize = 20, view = [-Pi .. Pi, -10 .. 10])


``

``

``

Simplifing the equations by assuming:

varepsilon := 1;

0

(1)

aprime_t := (1/8)*(-2*a^3*Gamma*omega__n^2*varepsilon*sin(2*varphi)-4*a*delta*omega__n^2*varepsilon*sin(2*varphi)+2*varepsilon*Y0*Omega^2*sin(phi+varphi)-8*omega__n*varepsilon*varsigma*a*Omega)/Omega^2*Omega = 0

(1/8)*(2*Y0*Omega^2*sin(varphi)-8*Omega*a*omega__n*varsigma)/Omega = 0

(2)

`ϕPrime_t` := (1/8)*(-4*a^3*Gamma*omega__n^2*varepsilon*cos(2*varphi)-6*a^3*alpha*omega__n^2*varepsilon-4*a*delta*omega__n^2*varepsilon*cos(2*varphi)-4*varepsilon*Delta*a*Omega^2+2*varepsilon*Y0*Omega^2*cos(phi+varphi))/(Omega^2*a)*Omega = 0

(1/8)*(-6*a^3*alpha*omega__n^2-4*Delta*Omega^2*a+2*Y0*Omega^2*cos(varphi))/(Omega*a) = 0

(3)

solve({`ϕPrime_t`, aprime_t}, [a, varphi])

[[a = RootOf(9*alpha^2*omega__n^4*_Z^6+12*Delta*Omega^2*alpha*omega__n^2*_Z^4+(4*Delta^2*Omega^4+16*Omega^2*omega__n^2*varsigma^2)*_Z^2-Y0^2*Omega^4), varphi = arctan(4*RootOf(9*alpha^2*omega__n^4*_Z^6+12*Delta*Omega^2*alpha*omega__n^2*_Z^4+(4*Delta^2*Omega^4+16*Omega^2*omega__n^2*varsigma^2)*_Z^2-Y0^2*Omega^4)*omega__n*varsigma/(Omega*Y0), 3*alpha*omega__n^2*RootOf(9*alpha^2*omega__n^4*_Z^6+12*Delta*Omega^2*alpha*omega__n^2*_Z^4+(4*Delta^2*Omega^4+16*Omega^2*omega__n^2*varsigma^2)*_Z^2-Y0^2*Omega^4)^3/(Omega^2*Y0)+2*Delta*RootOf(9*alpha^2*omega__n^4*_Z^6+12*Delta*Omega^2*alpha*omega__n^2*_Z^4+(4*Delta^2*Omega^4+16*Omega^2*omega__n^2*varsigma^2)*_Z^2-Y0^2*Omega^4)/Y0)]]

(4)

``


Download Example.mw

1 2 3 Page 1 of 3