Ali Guzel

Mr. Ali Guzel

50 Reputation

5 Badges

15 years, 184 days

MaplePrimes Activity


These are questions asked by Ali Guzel

DirectSearch finds nonexisting roots....     DirectSearch_finds_nonexisting_roots.mw

 

restart

plot([cos(x), 0.001*x*x],x=-40..40,y=0..2)     ### test function plot

 

eq:= cos(x)= 0.001*x*x;     ###   float

cos(x) = 0.1e-2*x^2

(1)

use RealDomain in solve(eq,x,explicit) end use   ## lacking some of the roots

-7.793210110, 7.793210110, -11.11953559, 11.11953559, -4.734809278, 4.734809278, -1.568336644, 1.568336644

(2)

use RealDomain in solve(eq,x) end use

-7.793210110, 7.793210110, -11.11953559, 11.11953559, -4.734809278, 4.734809278, -1.568336644, 1.568336644

(3)

fsolve(eq,x=-30)

-31.17938383

(4)

plot([cos(x), 0.001*x*x],x=-32..-31,y=0.9..1)

 

fsolve(eq,x=-32..-30);  fsolve(eq,x=-31.7..-31.4)

-31.17938383

 

-31.52634294

(5)

with(DirectSearch)

[BoundedObjective, CompromiseProgramming, DataFit, ExponentialWeightedSum, GlobalOptima, GlobalSearch, Minimax, ModifiedTchebycheff, Search, SolveEquations, WeightedProduct, WeightedSum]

(6)

eq;
SolveEquations(eq,AllSolutions):

cos(x) = 0.1e-2*x^2

(7)

interface(rtablesize=90);
SolveEquations(eq, AllSolutions)

90

 

Matrix(%id = 4800942722)

(8)

DirectSearch finds nonexisting roots!!!

Dr. Ali GÜZEL

 

Download DirectSearch_finds_nonexisting_roots.mw

restart; p := .5; n := 10; nseq := 2; with(Statistics); randomize(); x1 := seq(Sample(RandomVariable(BernoulliDistribution(p)), n), i = 1 .. nseq); x2 := seq(convert(x1[i], list), i = 1 .. nseq)

[HFloat(0.0), HFloat(1.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(1.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(1.0)], [HFloat(0.0), HFloat(1.0), HFloat(1.0), HFloat(1.0), HFloat(0.0), HFloat(0.0), HFloat(1.0), HFloat(0.0), HFloat(0.0), HFloat(0.0)]

(1)

x2[1]

[HFloat(0.0), HFloat(1.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(1.0), HFloat(0.0), HFloat(0.0), HFloat(0.0), HFloat(1.0)]

(2)

whattype(x2[1])

list

(3)

numboccur(x2[1], {0.})

0

(4)

NULL

But, when I plugged the list at (2) it works...  

numboccur([0., 0., 1., 1., 0., 0., 1., 0., 0., 0.], 0.)

7

(5)

``

NULL

NULL

Download numboccur.mwnumboccur.mw

Hello Guys and Girls,

I have a problem with animate command with background option..

I attached my maple worksheet for your review.

Could you help me out?  Thanks.

I love Maple,

Sincerely

Ali Guzel

Page 1 of 1