Casyopee - Functions defined by an algorithm
By continuing your navigation on this site, you accept the use of cookies to offer you contents and adapted services. Legal Notice.
 
What they say:   I used Casyopée to help students solve optimisation problems. It allowed me to present students very open tasks. Students explored and found results that they had to prove afterward. Casyopée also helped students reuse basic strategies for solving.   A teacher
What they say:   Casyopée is faster and more convenient than a calculator.... We have the geometric and algebraic side of the problem at the same time. It is easier to see how a function "reacts." It's useful and interesting.   A student
What they say:   Casyopée makes it easy to calculate a derivative, to factor, to calculate zeros... and have a graph of the function next to it in the same window. It allows on a geometric problem to be able to establish variables that can then be used to study the problem by way of functions...   A student
What they say:   Casyopee is a powerful application that can prove useful to both students and teachers It allows you to use various exploration and modeling tools, with the purpose of studying or teaching mathematical functions.   Softpedia
What they say:   Casyopee comes with lots of features. One of these features is the help provided for proving a function. There is also a feature for writing HTML reports that include the mathematical functions. Casyopee is guaranteed to improve the mathematical knowledge of its users.   phpnuke.org
What they say:   Besides the concept of number, the concept of function is the most important one in mathematics      David Hilbert
What they say:   The notion of function is present in all scientific disciplines, and also in everyday life. Our experience as a teacher shows every day that it is a problem for many students. Situations with Casyopée can also be used outside of a technological environment and everyone will be able to reflect on her professional practice.   A university teacher

Functions defined by an algorithm 

Forreference,seehere

  • ExamplesinAnalysis
    • TheEulermethodforan approximatesolutionofthedifferential equationy'=y
    • Approximateanti-derivative
  • Trajectories: Roadrunner andCoyote
    • FunctionswithvaluesinIR
    • FunctionswithvaluesinIR²

Examplesin Analysis

TheEuler methodforan approximatesolutionofthedifferential equationy'=y

Inthisexample,thebasicsteps tocreateanduseafunctiondefined byanalgorithmaredemonstrated.
Selecttheentryinthealgebra tabmenu.

Theprogram

Awindowopenswithanembryonicprogram.
 

Structure

Wemodifyline3andchoose Repeatinthelistontheleft.

 

 

Declarations
Wechangethedeclarationofthevariable y.

 


Withthecorrespondingmenuentry, aninputfieldopensforthe initialvalue.

Wereplace0by1theOK.



Wedeclareanewvariablep.


  Weselecttheletterinthelistontheleftandweinitializelikefor y

LoopBody

WechoosetheentryAffect VariableintheLoop

Abarsimilartotheinitializationappears.Thevariablehastobe selectedinthealreadydeclaredvariables.


Thelineisinsertedaftertherepeat line
Wealsointroduceline6(below).

StopCondition

Wemodifyline7.
Wekeepthevariablexand wechangetheformula0into 2.
Thusthefunctionwillbedefinedover[0;2]

Execution

Beforedefiningthefunction,we havetocheckthattheprogramrunscorrectly.
Wechoosetostoptheprogrambefore 500iterations.
Ifourprogramiscorrectit muststopafter200iteration;this limitof500willnotbereached.
Wechoosealsoafunctionwithvaluesin IR(checkx’!y (x)).
Ifourprogramiscorrectxvaluesareincreasing.

 

 

WeactivatethemenuentryTest twice(oneforchoosingthevariabletodisplay,theothertorun).
Wecheckthattheprogramrunscorrectly. Thevaluesofx,yandpinthe iterationaredisplayedin columns.
Wefillthecommentfieldto reminduswhatthefunction,thenOK tocreatethefunction.

Usingthefunction

Thefunctionappearsinthe listof  functionswiththecommentthatwehavechosen.
Abuttonwiththeletteralso appearsinthegraphic tab.Byactivatingthisbutton,the functionisgraphed.
Therealsoexistsanentryin thecurve menuofthegeometrytab.

 

Wecanchoosetodefinethe exponentialfunctionontheinterval[0, 2]andnotethat thecurvesaresuperimposed.
Amore accuratecomparisoncanbemadeusing thetable.

Wecanalsocreatethefunction f-g,toestimate thedifference.

Amessagewarnsthatthe function'suseislimitedtographics.

Indeed,wenotethatthe functionhhasadecentplot butCasyopéecannotcompute symbolicvalueash(2).
Anapproximatevalueofh(2) couldbeobtainedusing thetableorthepassingEvaluate Formula.

Approximate anti-derivative

Inthisexample,wewillshowhowCasyopée objectscanbeusedinan algorithm.

 

CasyopéeObjects

Createaparameterpfor thestepofthemethod,sothat wecanchangeit.


Createafunctionw,which canalsobechanged later.

Editingafunctiondefinedbyan algorithm


Byrightclicking  onthelineinthelistoffunctions correspondingtothefunctionf,we willmodifyitsprogram.


Deletepdeclarationatline 2.Thuspisnowthe parameter.

Modifyalsolines4and 5andthecommentsandtest thealgorithm.
Leprogram terminates,nous

Theprogramterminates,wecanapply thechangetothefunction(OK).

Usingthefunction

Byanimatingtheparameterp, weseehowthefunction obtainedfitsthefunctiondefinedby
Belowforthevaluesofp1, 1/2and1/20.



Itisalsopossibletochangethe functionw.Herewejusttake w(x)=xetU(x)=1+x²/2.

Trajectories:  RoadrunnerandCoyote

Functionswith valuesinIR

TheCoyoteispostedat20 mdistancefromtheexitofatunnel.
Roadrunnerexitsthetunnel onastraighttrailat aspeedof2m.s-1.
Coyote'srocketallows himtohaveaspeedof3m.s-1.
"Givenadirectionchosenbythe Coyote,canhecatchRoadrunner? ".

Functionsdefiningthetrajectories

Wedefineaparameterfor theslopeofthetrajectoryof Coyoteandanother forthetraveltime.

Roadrunner'strajectoryis thecurveofthefunctionb definedbythefollowingalgorithm.

Coyotte'strajectoryisthecurve ofthefunctioncdefinedby thefollowingalgorithm.

Usingthefunction

Oncethetwofunctionsandthe curvesarecreatedintheGeometry tabforagivenvalue ofaweanimatethe parameterT


Withaslopeof9/10coyote passesBeepBeep!Missed again.

Functionswith valuesinIR²

ImaginenowthatCoyoteruns constantlytowardsBipBip, withaspeedof5m.s-1 and Roadrunner1m.s-1.
WemodifyCoyotte'salgorithm andfixT=20.

Wefindthatthealgorithm stoppedattime5:Coyote outpacedRoadrunnerandturned around.
Wechoosetheothercheckbox thatcorrespondstoafunction withvaluesinIR².

Nowthetimedidgoup to20andthevaluesofx,abscissaof Coyotearenolongermonotonic.

ThedisplayintheGeometrytabas aparametric curveshowsCoyote'schaoticbehavior.


 


 

 

 


Creation date : 09/02/2016 - 19h41
Category : -
Page read 10517 times