Items tagged with fsolve fsolve Tagged Items Feed

hi.i am a problem for solving this non linear algebric equation.

please help me...thanks

FSOLVE.mw

FSOLVE.mw

 

Dear all,

I have a question: how to compute the roots of exp(z) = -1 with z in C? 

I tried: 

fsolve( exp(z) = -1, z, complex );

But it only gives one root (0.1671148658e-3+4.934802220*10^9*I) which does not even seem to be correct. I would prefere smth like z_n = I*(2*n-1)*pi or at least multiple roots...

By using

solve(exp(x) = -1, x);

it returns I*Pi.

 

MATLAB MuPAD gives the desired result:


solve(exp(x) = -1, x)

(PI*I + 2*PI*k*I, k in Z)

 

 

Thanks!

How I can solve it ? If I want a solution dependent of a. With fsolve? But how?

-x3+ax2-lnx=0
 

I want to solve one equation with one variable and the variable is also in definite integral delimiter. When trying fsolve, I get the error:

"Error, (in fsolve) Can't handle expressions with typed procedures"

code

Here is worksheet.mw

How can I obtain solution with method other from simple manual testing Te values?

hi.please help me for solve algebric equations below?

solve or fsolve dos not any answer?

i think use Newton  Raphson, because solve or fsolve not work.

thankscomparision.mw

restart; mu1 := .1; mu2 := .1; sigma1 := -40; F := 25; upsilon1 := (1/2)*sigma2; upsilon2 := (3/2)*sigma2-sigma1; sigma2 := 100

100

(1)

gamma11 := 2.686901; -1; gamma12 := 7.175339; -1; gamma21 := 2.436735; -1; gamma22 := 12.94855; -1; gamma22 := 12.94855; -1; delta1 := .928207; -1; delta2 := .105073; -1; s11 := .629894; -1; s12 := .217601; -1; s21 := 0.73897e-1; -1; s22 := .805815

.805815

(2)

 

 

 

 
Q1 := -mu1*p1-upsilon1*q1+gamma11*q1*(p1^2+q1^2)+gamma12*q1*(p2^2+q2^2)-delta1*(2*p1*q1*p2-q2*(p1^2-q1^2))-s11*F*q1+s12*F*q2 = 0

-.1*p1-65.747350*q1+2.686901*q1*(p1^2+q1^2)+7.175339*q1*(p2^2+q2^2)-1.856414*p1*q1*p2+.928207*q2*(p1^2-q1^2)+5.440025*q2 = 0

(3)

Q2 := -mu1*q1+upsilon1*p1-gamma11*p1*(p1^2+q1^2)-gamma12*p1*(p2^2+q2^2)-delta1*(2*p1*q1*q2+p2*(p1^2-q1^2))-s11*F*p1-s12*F*p2 = 0

-.1*q1+34.252650*p1-2.686901*p1*(p1^2+q1^2)-7.175339*p1*(p2^2+q2^2)-1.856414*p1*q1*q2-.928207*p2*(p1^2-q1^2)-5.440025*p2 = 0

(4)

Q3 := -mu2*p2-upsilon2*q2+gamma21*q2*(p1^2+q1^2)+gamma22*q2*(p2^2+q2^2)+delta2*(3*p1^2*q1-q1^3)+s21*F*q1 = 0

-.1*p2-190*q2+2.436735*q2*(p1^2+q1^2)+12.94855*q2*(p2^2+q2^2)+.315219*p1^2*q1-.105073*q1^3+1.847425*q1 = 0

(5)

Q4 := -mu2*q2+upsilon2*p2-gamma21*p2*(p1^2+q1^2)-gamma22*p2*(p2^2+q2^2)+delta2*(-p1^3+3*p1*q1^2)-s21*F*p1 = 0

-.1*q2+190*p2-2.436735*p2*(p1^2+q1^2)-12.94855*p2*(p2^2+q2^2)-.105073*p1^3+.315219*q1^2*p1-1.847425*p1 = 0

(6)

 

-.1*q2+((3/2)*sigma2-40)*p2-2.436735*p2*(p1^2+q1^2)-12.94855*p2*(p2^2+q2^2)-.105073*p1^3+.315219*q1^2*p1-1.847425*p1

(7)

NULL

fsolve({Q1, Q2, Q3, Q4}, {p1, p2, q1, q2})

fsolve({-.1*p1-65.747350*q1+2.686901*q1*(p1^2+q1^2)+7.175339*q1*(p2^2+q2^2)-1.856414*p1*q1*p2+.928207*q2*(p1^2-q1^2)+5.440025*q2 = 0, -.1*p2-190*q2+2.436735*q2*(p1^2+q1^2)+12.94855*q2*(p2^2+q2^2)+.315219*p1^2*q1-.105073*q1^3+1.847425*q1 = 0, -.1*q1+34.252650*p1-2.686901*p1*(p1^2+q1^2)-7.175339*p1*(p2^2+q2^2)-1.856414*p1*q1*q2-.928207*p2*(p1^2-q1^2)-5.440025*p2 = 0, -.1*q2+190*p2-2.436735*p2*(p1^2+q1^2)-12.94855*p2*(p2^2+q2^2)-.105073*p1^3+.315219*q1^2*p1-1.847425*p1 = 0}, {p1, p2, q1, q2})

(8)

solve(Q1, Q2, Q3, Q4)

Error, invalid input: too many and/or wrong type of arguments passed to solve; first unused argument is -.1*q1+34.252650*p1-2.686901*p1*(p1^2+q1^2)-7.175339*p1*(p2^2+q2^2)-1.856414*p1*q1*q2-.928207*p2*(p1^2-q1^2)-5.440025*p2 = 0

 

Sol := [fsolve(ZZ, omega)]



Download comparision.mw

I have written a code which generates a Gaussian like curve as a set of points and have written some basic commands to find several important quantities from the plot. The three of importance here are the peak position, peak height and Full Width at Half Maximum.

See the attached minimal working example maple worksheet.

It can find the peak position and the peak height no problem, but another quantity I want it to find is the Full Width at Half Maximum (FWHM). I use the aforementioned calculated values to find the left and right components of the FWHM but the fsolve command just hangs.

In the worksheet this is not evident but in the much longer full code which I run through the terminal and prints the values to a file, it begins the fsolve command and reaches a particular value and it just hangs. No amount of waiting time makes it continue the calculation.

However if I use an approximate integration scheme (such as Riemann sums) then the fsolve part executed perfectly. fslove seems to get stuck during the numerical integration step.

There is probably an easy answer to this problem which I am missing. Any help is appreciated.

fsolve_numerical_integration.mw

 

- Yeti

 

I have an equation as shown below.  In this i need to get the value of 'a' for each 'omega'.  'omega' range from 0 to 2 with increment 0.01

And save all the values of 'a' as a column matrix named 'result'.

 

!!!  Please help  !!!

0.4e-3*a^2*omega^2+(-2.1739*a+a*omega^2+(1.495414012*(sqrt(a^2+.2916)*EllipticE(sqrt(a^2/(a^2+.2916)))-.2916*EllipticK(sqrt(a^2/(a^2+.2916)))/sqrt(a^2+.2916)))/a)^2-0.1e-3 = 0

 

Download problem_1.mw

 

 

Dear all,

I developed a program to solve f(x, y) = 0 and g(x, y) = 0, I obtained as results (x=2.726, y=2.126) . running the same program another time it gives (x=2.762, y=1.992). how to explain this?

> fsolve({f(x, y) = 0, g(x, y) = 0}, {x = 0 .. infinity, y= 0 .. infinity});

Thanks in advance.

I tried to solve a system of two equations using fsolve in Maple, however Maple didn't return any result (yet there is the result of that equation's system):

Maple is returning the command if there are no roots but that isn't my case.

How can I obtain the result in Maple?

worksheet.mw

I want to solve a system of equations using f-solve (two unknowns) and exporting the solutions to a matrix where the solutions are in seperate columns. How do I do this?

I have tried:

for i from 1 to 937 do

AP[i,1]:=fsolve(x=KL[i,1].y=KL[i,2],x=..8,y=0..15))

end if

end do

 

But this returns the solutions for X and Y in the same column. Also, for the values that are not possible to solve, it returns the entire expression instead of e.g. 0 or "undefined".

Thank you.

 

It returns unevaluated.  The solution is x=-ln(3),y=0.  In fact it doesn't give a solution even if the solution is provided as the initial point.  The value of Digits doesn't seem to make a difference.

(Tested Maple 2015.2 Macintosh and Maple 2015.1 Linux)

Hello dears! Hope everything going fine with you. I have faced problem while solving the system of equations using fsolve command please find the attacment and fixed my problem.

I am very thankful to you for this favour. 

VPM_Help.mw

Mob #: 0086-13001903838

for the questions below

you can use A,B,C as single varible or matrix form if needed

you can use A,B,C as single varible or matrix form if needed

 

1.how to calculate AA1, AA2 and B2 in terms of A,B,C?

2.how to calculate A,B,C in terms of AA1, AA2 and B2 ?

xrestart;

with(LinearAlgebra):
A := Matrix([[a1,a2,a3],[a4,a5,a6],[a7,a8,a9]]);
B := Matrix([[b1,b2,b3],[b4,b5,b6],[b7,b8,b9]]);
C := Matrix([[c1,c2,c3],[c4,c5,c6],[c7,c8,c9]]);
#AA1,AA2, C:=seq(Matrix(3, symbol=i), i=[a,b,c]);
#AA1 := Matrix([[aaa1,0,0],[0,aaa1,0],[0,0,aaa1]]);
#AA2 := Matrix([[aab1,0,0],[0,aab1,0],[0,0,aab1]]);
#B2 := Matrix([[aabb1,0,0],[0,aabb1,0],[0,0,aabb1]]);
AA1 := Matrix([[aaa1,aaa2,aaa3],[aaa4,aaa5,aaa6],[aaa7,aaa8,aaa9]]);
AA2 := Matrix([[aab1,aab2,aab3],[aab4,aab5,aab6],[aab7,aab8,aab9]]);
B2 := Matrix([[aabb1,aabb2,aabb3],[aabb4,aabb5,aabb6],[aabb7,aabb8,aabb9]]);
eq2 := C.A+C.B;
eq3 := C.B+C;
eq4 := B+C.A;
ABC := fsolve(map(t->Equate(op(t))[], [eq2=AA1,eq3=AA2,eq4=B2]));

hi.i trust that attached equation has more answer but fsolve only gain some of them!!! how i can gain another that i know value of them?

another root  that i known, are : 0.165237712988657e-1    and     .103583272213766    and    .290071279318035

thanks 

root.mw

hi.after calculate Determinant of matrix  and gain value omega'' ω'' by fsolve rule ,when substuting result (ω) in matrix (q) and calculate Determinant again, this value is not zero!!!! may i use LUDecomposition?determinan.mw

1 2 3 4 5 6 7 Last Page 1 of 11