1

Bonjour (a 3h du mat c'est ce que l'on dit non? ^^)
Voici un programme que j'ai repris de ma ti83+ et que j'ai plus ou moin adapte a ma ti89 (avec plus ou moin du mal)
mis a part le cote graphique il me reste quelques problemes a regler (en rouge) que je n'arrive pas a resoudre/comprendre avec mes conaissances faites sur le tas
c'est pas le premier prog en basic que je decortique mais c'est le premier que je cherche a adapter
pour le reste le programme semble marcher
le but de celuici est de calculer une derivee et de creer un tableau de signe et variation (rien de bien mechant)
j'espere que vous pourrez m'aider a resoudre ces petits desagrements

voici la bete
(ps si vous voules le programme source, celui de la 83 dites le moi et je le met)


Prgm
ClrDraw:ClrIO
Input "f(x)=",str1
d(str1,x)->str2
Disp "f'(x)=",str2
DelVar y1
DelVar y2
expr(string(str1))->y1(x)
expr(string(str2))->y2(x)
Lbl z
Input "Intervalle mini 'I' =",i
Input "Intervalle maxi 'J' =",j
If i [>ou=] j Then
Disp "Impossible !":Goto z
EndIf
ClrIO
Output 30,30,"Calcul en cour"
Output 30,115,"."
20->r
DelVar l1
DelVar l2
(j-i)/r->p
seq(nDeriv(y1(x),x,a),a,i,j,p)->l1
Output 30,120,"."

** Ceci est le 1er problene

# r->dim(l1)


For a,1,r
If l1*a>0 Then
1->l1(a)
ElseIf l1*a<0 Then
-1->l1(a)
ElseIf l1*a=0 Then
0->l1(a)
EndIf
EndFor
Output 30,125,"."
PlotsOff
FnOff
setGraph("Axes","Off")
0»xmin
94->xmax
0->ymin
62->ymax
For w,0,20
EndFor
ClrIO
ClrDraw
LineHorz 0
LineHorz 62
LineVert 0
LineVert 94
LineHorz 50
LineHorz 38
LineVert 20
PxlOff 0,0
PxlOff 0,158
PxlOff 76,0
PxlOff 76,158
PxlText "x",5,15
PxlText "f'(x)",19,2
PxlText "f(x)",50,5
PxlText "I",3,35
PxlText "J",3,150
If inString(str1,"x")=0 Then
Goto c
EndIf

** Voici le 2nd (le meme)

# 0->b:0->dim(l2)


For a,1,r-1
If l1*a=0 Then

**
# b+1->b:b->dim(l2)


i+(a-1)*p->l2(b)
EndIf
If l1*a=ªl1*(a+1) Then

**
# b+1->b:b->dim(l2)


solve(y2(x) and x and i+a*p-.5*p,{i+(a-1)*p,i+a*p})->l2(b)
EndIf:EndFor
If b>8 Then
ClrIO
Disp " Il y'a trop de variations."," Il faut moin de 8"," annulations pour f'(x)."
Pause :ClrIO:Return
EndIf
If b=8 Then
Goto s
EndIf
"abcdefg8"->str3
int(70/(b+1))->q
For a,1,b
int(a*(70/(b+1)))+20->c

** La j'ai "Error: Too many arguments"
# PtText 5,c,shift(str3,a,1)


PtText 19,c,0
EndFor

**

# b-(l2(dim(l2))=j)->b


For a,0,b
int(20+(a+.5)*q)->d
If 0=a Then
nDeriv(y1(x),x,(2*l2(1)-.1)/2)->c
EndIf
If dim(l2)>a and 0>a Then
nDeriv(y1(x),x,(l2*a+l2*(a+1))/2)»->c
EndIf
If c>0 Then
PtText "+",19,d
Line aq+23,3,aq+q+20,35
EndIf
If c<0 Then
Line aq+23,35,aq+q+20,3
PtText "-",19,d
EndIf:EndFor
Goto f
Lbl s
If nDeriv(y1(x),x,(i+j)/2)>0 Then
PtText "+",19,55
Line 23,3,90,35
EndIf
If nDeriv(y1(x),x,(i+j)/2)<0 Then
PtText "-",19,55
Line 23,35,90,3
EndIf:0->b:Pause
Goto e:Lbl c
For a,20,90,5
PxlText 19,a,0
EndFor:0->b
Line 23,18,90,18
Pause :Goto e
Lbl f:Pause
ClrIO
Disp "'f(x)=0 pour:"
For a,1,dim(l2)

** La j'ai aussi "Error: Too many arguments"

# Disp shift(str3,a,1)+"1=",l2(a):Pause


EndFor:Lbl e
If b>7 Then
Disp "f(h)=",y1(x)*l2(8)
Pause :EndIf
If b>6 Then
Disp "f(g)=",y1(x)*l2(7)
Pause :EndIf
If b>5 Then
Disp "f(f)=",y1(x)*l2(6)
Pause :EndIf
If b>4 Then
Disp "f(e)=",y1(x)*l2(5)
Pause :EndIf
If b>3 Then
Disp "f(d)=",y1(x)*l2(4)
Pause :EndIf
If b>2 Then
Disp "f(c)=",y1(x)*l2(3)
Pause :EndIf
If b>1 Then
Disp "f(b)=",y1(x)*l2(2)
Pause :EndIf
If b>0 Then
Disp "f(a)=",y1(x)*l2(1)
Pause :EndIf
Disp "f(i)=",y1(x)*i
Pause
Disp "f(j)=",y1(x)*j
Pause

Toolbar
Title "Tracer la courbe?":Item "Non",no:Item "Oui",ou
EndTBar
Lbl no
NewProb
Stop
Lbl ou
i->xmin:j->xmax
FnOn 1
setGraph("Axes","On")
DispG
EndPrgm

2

Heu... S'il s'agit d'un programme pour les TI 68K (89,V200,92...), ce n'est pas le bon forum, mais tu peut faire un tour ici pour avoir une réponse à ta questions.

3

ah.. eu desole tongue
jvai reposter la bas alors
merci