Help in Mathematica

1. Nov 30, 2013

Reem Hashem

Hello,I have a problem in writing my code in Mathematica, when I put values of R,T,S&a the system worked and gave me result but when I put the system in for loop , it gave me errors,I hope someone help me and thank you

Attached Files:

File size:
35.4 KB
Views:
77
• right equations.nb
File size:
36.9 KB
Views:
79
2. Nov 30, 2013

Bill Simpson

Item 1: You have For[S = 6, S <= 6, S = s + 1 and that last "s" should probably be "S"

Item 2: I think you need a ; between your m=NDSOLVE[...] and c=Det[...]

Item 3: I think you have a misplaced ]. It looks like your innermost For[] does 11 different m=..., the For is finished and only the last result is saved in m AND THEN you do c=Det[.../.m]

When I make all those changes with what I guess is correct then your error messages go away and I get very different output.

3. Dec 7, 2013

Reem Hashem

problem in findroot

Hello Mr Bill,thank you again for your help ,my new code is the same like before but with the change of the differential systems but I faced a problem when I used Findroot function,my system works but when I add the FindRoot Function the program did not response,so I hope to find the error in the Findroot function,and thank you again

File size:
26.5 KB
Views:
54
4. Dec 7, 2013

Reem Hashem

Mr Bill I tried to change the interval in the Find Root Function but I got errors,I hope to check them

File size:
32.3 KB
Views:
58
5. Dec 7, 2013

Bill Simpson

You are asking FindRoot to look for a root inside a specific interval and to fail if it cannot find a root in that interval. FindRoot looks, cannot find a root inside that interval and fails. The error message tells you that it failed to find a root in the interval that you require.

You can try to change the interval. You can try to learn more about the function you are trying to solve and thus know better how to solve it. You can try plotting the function before you solve it and see how it behaves. Any and all these can help you understand how to get a correct answer.

Have you and I been through this before? This seems very similar to a problem that I and someone, perhaps you, went over and over and over and over. We never seemed to be able to understand each other with that problem.