Help with Mathematica Problem Solving

  • Thread starter Reem Hashem
  • Start date
  • Tags
    Mathematica
In summary, Mr Bill has a problem with finding roots in an interval. He has tried changing the interval, but has had trouble getting an error message to go away. He is hoping to learn more about the function he is trying to solve in order to get a correct answer.
  • #1
Reem Hashem
23
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

  • Untitled-8.nb
    35.4 KB · Views: 495
  • right equations.nb
    36.9 KB · Views: 500
Physics news on Phys.org
  • #2
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.
 
  • #3
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

  • step4 false.nb
    26.5 KB · Views: 376
  • #4
Mr Bill I tried to change the interval in the Find Root Function but I got errors,I hope to check them
 

Attachments

  • step4 false.nb
    32.3 KB · Views: 375
  • #5
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.
 

1. How can I get started with Mathematica for problem solving?

To get started with Mathematica for problem solving, you can go through the built-in tutorials and documentation to familiarize yourself with the software. You can also find online resources and forums for tips and tricks, and practice by solving smaller problems to build your skills.

2. What are some useful built-in functions for Mathematica problem solving?

Some useful built-in functions for Mathematica problem solving include Solve, NSolve, Reduce, and FindRoot for solving equations and systems of equations, NMinimize and FindMinimum for optimization problems, and Integrate and Sum for mathematical calculations.

3. How can I plot my data in Mathematica to aid in problem solving?

To plot your data in Mathematica, you can use the built-in Plot function or explore other plot types such as ListPlot, BarChart, and Histogram. You can also customize your plots by adding labels, legends, and other formatting options to better visualize your data.

4. How can I troubleshoot errors in my Mathematica problem solving?

If you encounter errors while using Mathematica for problem solving, you can check the syntax of your code, make sure all necessary variables and functions are defined, and use the built-in error checking tools. You can also refer to the documentation or seek help from online forums and communities.

5. Can I use Mathematica for more complex problem solving tasks?

Yes, Mathematica is a powerful tool for problem solving and can handle complex tasks such as machine learning, image processing, and data analysis. With its vast library of built-in functions and the ability to create custom functions, Mathematica can tackle a wide range of problems in various fields of science and engineering.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
6
Views
606
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
399
  • Differential Equations
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
246
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
Replies
3
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • Differential Equations
Replies
1
Views
1K
Back
Top