Help with Mathematica Problem Solving

  • Thread starter Thread starter Reem Hashem
  • Start date Start date
  • Tags Tags
    Mathematica
Reem Hashem
Messages
23
Reaction score
0
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
 

Attachments

Physics news on Phys.org
In your Untitled-8.nb

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.
 
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
 

Attachments

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

Attachments

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

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.
 
Thread 'Direction Fields and Isoclines'
I sketched the isoclines for $$ m=-1,0,1,2 $$. Since both $$ \frac{dy}{dx} $$ and $$ D_{y} \frac{dy}{dx} $$ are continuous on the square region R defined by $$ -4\leq x \leq 4, -4 \leq y \leq 4 $$ the existence and uniqueness theorem guarantees that if we pick a point in the interior that lies on an isocline there will be a unique differentiable function (solution) passing through that point. I understand that a solution exists but I unsure how to actually sketch it. For example, consider a...
Back
Top