derivative error

derivative error - Mensajes

#1 Publicado: 25/2/2012 22:59:10
Waluyo Adi Siswanto

Waluyo Adi Siswanto

1 me gusta en 55 mensajes.

Grupo: User

Dear SMath,

I did a simple derivative calculations with incorrect result.



If I use 2*tt^5 also the same problem.

regards
waluyo
#2 Publicado: 26/2/2012 3:29:38
Radovan Omorjan

Radovan Omorjan

325 me gusta y 1 no me gusta en 2.052 mensajes.

Grupo: Moderator

Hello waluyo,

I think there is nothing nothing wrong with your results. I suppose you wanted to use these functions on every elements of vector "tt". This should be done this way:
[MATH=eng]for(i,range(1,length(tt)),line(el(s,i):s(el(tt,i)),el(ds,i):v(el(tt,i)),el(dv,i):a(el(tt,i)),3,1))[/MATH]
[MATH=eng]s=mat(6,-16,-26,-12,38,5,1)[/MATH][MATH=eng]ds=mat(-24,-18,0,30,72,5,1)[/MATH][MATH=eng]dv=mat(0,12,24,36,48,5,1)[/MATH]
Pay attention then when you multiply two vectors you will get their scalar product - not the vector which represents the product of their appropriate elements:
[MATH=eng]tt*tt=30[/MATH] [MATH=eng]tt^2=30[/MATH] [MATH=eng]sum((el(tt,i)^2),i,1,length(tt))=30[/MATH]

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
#3 Publicado: 26/2/2012 6:31:00
Waluyo Adi Siswanto

Waluyo Adi Siswanto

1 me gusta en 55 mensajes.

Grupo: User

Thanks Radovan,

What I did was actually similar what I have done in Mathcad. That works in Mathcad with all correct answers.
I was thinking it would be OK in SMath, but actually not acceptable in SMath.

I have to do a bit programming to calculate every element of the vector in SMath.
Your explanation is clear to me.

Regards,
waluyo

#4 Publicado: 26/2/2012 8:17:46
Radovan Omorjan

Radovan Omorjan

325 me gusta y 1 no me gusta en 2.052 mensajes.

Grupo: Moderator

You are welcome waluyo

Glad that I was of any help. Actually, I also often made mistakes in SMath mixing it with Mathcad, as well as you did.

Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
  • Nuevos mensajes
  • Sin mensajes nuevos