f



handling exact solution from solve vs numerical solution from fsolve for same equation

 
hello;

I am asking for the difference between

> Digits:=200;
>
> eq:=-x^3+6*x^2-6*x-1:
> fsolve(eq=0,x)[1];
>
> solve(eq=0,x)[1];
> evalf(%);

The result of evalf(%) above contains a complex part. No matter how 
large I make Digits to be.
the result of fsolve contains only real part.

The question is, would you consider this equation to have complex or 
real roots?

thanks,
Nasser




0
Nasser
10/14/2005 10:04:07 PM
comp.soft-sys.math.maple 4344 articles. 3 followers. Post Follow

1 Replies
685 Views

Similar Articles

[PageSpeed] 37

In article <rXV3f.2604$tV6.1659@newssvr27.news.prodigy.net>,
Nasser Abbasi <nma@12000.org> wrote:

|>I am asking for the difference between

|>> Digits:=200;

|>> eq:=-x^3+6*x^2-6*x-1:
|>> fsolve(eq=0,x)[1];

|>> solve(eq=0,x)[1];
|>> evalf(%);

|>The result of evalf(%) above contains a complex part. No matter how 
|>large I make Digits to be.
|>the result of fsolve contains only real part.

Yes, the solution of a cubic with rational coefficients and three 
irrational real roots (the "casus irreducibilis") using radicals 
must involve complex numbers: the solutions are not in a radical
extension of Q contained in the real line.  Do a floating-point
computation involving I and roundoff error is likely to give you
a nonzero imaginary part in the result.

But Maple does know how to get real solutions involving trigonometric 
functions:

> map(simplify @ evalc,[solve(eq,x)]);

      1/2                1/2                1/2  1/2
  [2 2    cos(%1) + 2, -2    cos(%1) + 2 - 3    2    sin(%1),

          1/2                1/2  1/2
        -2    cos(%1) + 2 + 3    2    sin(%1)]

                     1/2
                   23
  %1 := 1/3 arctan(-----)
                     3


|>The question is, would you consider this equation to have complex or 
|>real roots?

Real, of course.  You can also use Sturm's Theorem to count the number
of real roots.

> sturm(sturmseq(eq,x),x,-infinity,infinity);

                                  3

Robert Israel                                israel@math.ubc.ca
Department of Mathematics        http://www.math.ubc.ca/~israel 
University of British Columbia            Vancouver, BC, Canada
0
israel
10/14/2005 10:27:06 PM
Reply:

Similar Artilces:

Solve exact problem with approx solution, or solve approx problem with exact solution
Tukey (inventor of FFT) thinks that an approximate solution of the exact problem is often more useful than the exact solution of an approximate problem. I find it hard to argue which one is more important or useful. Once you believe in one of them, your belief will lead your research style to either algorithm-centered or model-construction-centered. Anybody wants to elaborate on either of these two views? b83503104@yahoo.com wrote: > Tukey (inventor of FFT) thinks that an approximate solution of the > exact problem is often more useful than the exact solution of an > approximate ...

solution or not solution with solve?
Hi, I have a problem with solve, det and sub in matlab symbolic. I'm trying to solve : det(K) = 0 . K depends on 'alpha', symbolic unknowns. Theory predicts six solutions, and I found them. But when I try to check the results using subs(det(K),'solutions',solutions), 4 solutions give effectively det(K) = 0, while the others don't nullify the determinant. I'm very annoyed by this. Dou you have any idea about the origines of this and where is the bug? Thanks a lot! Sig Ponge wrote: > Theory predicts six solutions, and I found them. > > But when I t...

Maple: (and CAS in general) When I simplify first, then solve gives a solution, if I do not simplify, solve does not give a solution.
Hello; (This is a general CAS question I think, but my example uses Maple. I am sure one can find such an 'issue' in other CAS systems) Is it normal/OK behaviour for things to work as follows: Given some equation, ask solve to solve it for some unknown. Now, if I call simplify() first on the equation then call solve() on the result, then I get an answer/solution otherwise I do not or I get some other warning/error. This means solve() could not find a solution in the present form of the equation or expression (even though a solution does exist if the form 'l...

Analytic Solution != Numerical Solution
Dear Group members, I ran into a case where Mathematica Solve yields different solutions depending on whether I solve it analytically (and then plug in some numbers) or numerically. I'm solving an algebraic equation, with some square roots. Mathematica does NOT complain about branch cut or anything else when solving the problem analytically. Based on physical reasoning that created the equation in the 1st place the purely numerical solution is the correct one. I attached a 3-line pdf version of the notebook that demonstrates this issue. Thank you for any suggestions! https://docs.goo...

Help!! Solving equation , solution is not in numerical format ?? (new user)
Hi, I use solve comman to solve an equation(see below). I got the result, however, it somehow is a string (10000/17) rather than a numerical number(588.23). What can I do to make it numerical number? Thanks. I appreciate your help in adavnce !!! ------------------------- p=50 wQF=40 a=0.2 w=0.2 ub=800 lb=400 v=20 syms x y f=1/(ub-lb); %pdf of a uniform distribution F=(x-lb)/(ub-lb); % cdf F(x) FQF=(p-wQF)*(1+a)*(1-int(f,lb,(1+a)*y))-(wQF-v)*(1-w)*int(f,lb,(1-w)*y); qQF=solve(FQF,y) Result: qQF= 10000/17 ...

numerical solution of equation
I'm starting with Matlab and I don't know what to do to solve numerically x+e*sin(x)=omega*t where e, omega and t are calculated earlier in the program. Many thanks, tania In article <eefb68a.-1@webx.raydaftYaTP>, Tania <tania.re@wanadoo.fr> wrote: > I'm starting with Matlab and I don't know what to do to solve > numerically > > x+e*sin(x)=omega*t > > where e, omega and t are calculated earlier in the program. > > Many thanks, > > tania ------ Hello Tania, Do you have the Symbolic Math Toolbox? If so, try that with 'so...

get solution manuals, solution manual, solutions
These are part of our solutions not shown here , if the solution you want isn't in the list, do not give up, just contact us and we will find it to you email: lsms9[at] yahoo.com it's ls...@yahoo.com we have a lot of solutions manual over 700 solutions manual solution manual Math solution manual physics solution manual Calculus solution manual Dynamics solution manual mechanics solution manual electromagnetics solution manual Thermodynamics solution manual Circuits =2E. =2E. in low cast price .. Are you looking for solution manuals, solution manual, solutions I have solution m...

Maple 9 is unable to solve numerically this equation but Maple 5 does it!
Well, just for the records: Maple 9 is unable to execute this: fsolve(min(x+51580800.0,5652700000.0,x+51580800.0+.8585358682e13/x^(1/2)) = 4368842661., x, 1684100000.0 .. 5652700000.0); It gives up with the following error message: Error, (in PiecewiseTools:-Convert) unable to convert On the other hand, Maple V and Maple 6 does it well. I'm trying to convert an old Maple V worksheet to Maple 9 and this work is not being easy! Black boxes, black boxes ... Greetings, Humberto. Humberto Jose Bortolossi wrote: > fsolve(min(x+51580800.0,5652700000.0,x+51580800.0+.8...

How to find more solutions for an periodical equation with infinity solutions
Dear all, I have a matrix defined as: Matrix[{\[Alpha]_, \[Beta]_, \[Gamma]_}, \[Theta]_] := {{\[Alpha]^2 \ (1 - Cos[\[Theta]]) + Cos[\[Theta]], \[Alpha] \[Beta] (1 - Cos[\[Theta]]) - \[Gamma] Sin[\[Theta]], \[A lpha] \[Gamma] (1 - Cos[\[Theta]]) + \[Beta] Sin[\[Theta]]}, {\[Alpha] \[Beta] (1 \ - Cos[\[Theta]]) + \[Gamma] Sin[\[Theta]], \[Beta]^2 (1 - Cos[\[Theta]]) + Cos[\[Theta]], \[Beta] \[Gamma] (1 - Cos[\[Theta]]) - \[Alpha] Sin[\[Theta]]}, {\[Alpha] \[Gamma] \ (1 - Cos[\[Theta]]) - \[Beta] Sin[\[Theta]], \[Beta] \[Gamma] (1 - Cos[...

Using the solution of a differential equation and minimizing the solution.
Hi all, I am working in beam physics.I am getting used to mathematica now.But feel little uncomfortable doing few things. Now I solved a differential (simulataneous ) equation in {X''(z),Y''(z),X(z),Y(z)} with four intial conditons and getting the answer for X & Y in interpolating function.I plot it for required z and its all fine and great and FAST!! Question 1: Now I want to find the minimum of this solution X(z).How do i use the function FindMinimum for this interpolating function? Question 2: In the long run I want to find the value of the intial ...

numerical solution of schrodinger equation
please describe the details of shooting method to solve schrodinger equation for an electron confined in a 1D infinite-Quantum well with width d.thank youe very much. Define vector x first, with length n and solve for y(x).Set y(1)=0;y(2)=1; and vary E until you obtain y(n)==0 or abs(y(n))<1e-6. Simply "integrate" the SE to obtain y(3) from y(2) and y(1) and so on. But you better use FEMLAB if you have that. /Per reza mohseni wrote: > > > please describe the details of shooting method to solve schrodinger > equation for an electron confined in a 1D infinite-Qu...

Solving multi-solution equation
Hello, Problem: Need to calculate coefficients B(n) in equation (1), i.e. solutions of the equation (where P(n) and M(n) are known variables). eq(1): sum[P(n)/(1-(M(n)/B(n)))]=1, where n ranges from 0 to N. For each increasing n, coefficient B takes one value between an increasing interval, e.g. below are the possible values B can assume, in agreement with index n: n=1 then 0<B1<0.5 n=2 then 0.5<B2<0.7 n=3 then 0.7<B3<1 In sum it's the equivalent of solving (A*B1 + A*B2 + A*B3 + ... + AnBn=1, where A is a constant) for all coefficients B. With the added particular...

numerical solution for cubic equation
hello, I am now trying to solve a cubic equation like this: Z^3 + A*Z^2 +B*Z +C = 0 while A, B and C have some value. I want to solve the equation. but when I use the command: solve('Z^3 + A*Z^2 +B*Z +C = 0','Z') it only gives out simbolic solution, while i need the numerical solution. Is there anyway to get the numerical solution? thanks Done/ roots.m will help Zhuoyang Lian wrote: > > > hello, I am now trying to solve a cubic equation like this: > Z^3 + A*Z^2 +B*Z +C = 0 > while A, B and C have some value. I want to solve the equation. but > when I use the...

Solving equation with multiple solutions
Hello, Problem: Need to calculate coefficients B(n) in equation (1), i.e. solutions of the equation (where P(n) and M(n) are known variables). eq(1): sum[P(n)/(1-(M(n)/B(n)))]=1, where n ranges from 0 to N. For each increasing n, coefficient B takes one value between an increasing interval, e.g. below are the possible values B can assume, in agreement with index n: n=1 then 0<B1<0.5 n=2 then 0.5<B2<0.7 n=3 then 0.7<B3<1 In sum it's the equivalent of solving (A*B1 + A*B2 + A*B3 + ... + AnBn=1, where A is a constant) for all coefficients B. With the added particula...

Web resources about - handling exact solution from solve vs numerical solution from fsolve for same equation - comp.soft-sys.math.maple

Numerical - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Equilibrium - Can You Strike A Numerical Balance? on the App Store on iTunes
Get Equilibrium - Can You Strike A Numerical Balance? on the App Store. See screenshots and ratings, and read customer reviews.

Numerical Simulation of Nix's Rotation - YouTube
This is a numerical simulation of the orientation of Nix as seen from the center of the Pluto system. It has been sped up so that one orbit of ...

Gillian Heinrich’s has numerical advantage at Sunday’s Gold Coast races
THERE will be a Chris Waller-like feel at the Gold Coast races on Sunday when local trainer Gillian Heinrich saddles up four of the 10 runners ...

Today’s Best Apps: Numerical, The Tonight Show, Digestable And R-TYPE II
... simply tap an item for more information, such as manufacturing process and any common side effects, typically stated in layman’s terms. Numerical: ...

Numerical: Calculator Without Equal
Holen Sie sich „Numerical: Calculator Without Equal“ im App Store. Sehen Sie sich Screenshots, Bewertungen und Kundenrezensionen dazu an.

Download this app right now: Numerical for iPhone and iPad is now free
... deals on well-designed apps, however, we'll also bring them to your attention individually — and such is the case with Andrew J Clark's " Numerical ...

FOMC Minutes: "Most participants agreed numerical thresholds could be useful"
... response to incoming data on the economy . Many participants thought that more-effective forward guidance could be provided by specifying numerical ...

Quentin Tarantino's Next Western Reportedly Has A Numerical Title
Quentin Tarantino is a filmmaker who is known for making particular kinds of films, with adrenaline and testosterone always on full display, ...

Divided Fed considers numerical triggers for rates policy
AFP Divided Fed considers numerical triggers for rates policy CNBC.com WASHINGTON (Reuters) - The US Federal Reserve may adopt numerical thresholds ...

Resources last updated: 2/13/2016 1:59:39 AM