## 65 Reputation

11 years, 95 days

## Integrating factor...

@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,

## solve() cannot be used...

@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.

## Exact sloutions might not be found...

@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.

## Solutions equal to zero...

@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

## only works for certain cases...

@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

## Analytical solution...

@Kitonum I am looking for an analytical expression.

Thanks,

Baharm31

## with substitution...

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

Thanks,

Baharm31

## with substitution...

@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

## After "eliminate"...

@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

## @vv Thaks. It was the correct answe...

@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

Bahar

## plot the results of an equation...

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])

## Attached file...

Simplifing the equations by assuming:

 (1)

 (2)

 (3)

 (4)