Want help regarding my classical mechanics assignment

Click For Summary
SUMMARY

The discussion centers on creating a C program to determine if a given force function F(x) = ax^n + bx^(n-1) + ... is conservative. The condition for a force to be conservative is that the curl of the force vector must equal zero. In this case, since the function only involves x, the force is inherently conservative regardless of the coefficients provided. To fully analyze forces in multiple dimensions, the user should consider incorporating y and z components into their function.

PREREQUISITES
  • Understanding of classical mechanics, specifically conservative forces
  • Familiarity with vector calculus, particularly the concept of curl
  • Proficiency in C programming language
  • Basic knowledge of polynomial functions and their coefficients
NEXT STEPS
  • Research the mathematical definition of curl in vector calculus
  • Learn how to implement vector functions in C programming
  • Explore multi-dimensional force functions and their properties
  • Study examples of conservative and non-conservative forces in physics
USEFUL FOR

This discussion is beneficial for physics students, C programmers working on simulations, and anyone interested in understanding the properties of conservative forces in classical mechanics.

Dr.Brain
Messages
539
Reaction score
2

Homework Statement



I need to write a C program to simulate physics problems. My job is to write a code , in which I give the user a function F(x) = ax^n + bx^(n-1) + ... , and user inputs the coefficients a,b,c ... and my computer code should tell whether the given force F(x) is conservative or not.

Please tell me what is the condition for any f(x) to be conservative , I am good at C , but i have no idea about the condition .Please help me formulate this problem.

Thanks.
 
Physics news on Phys.org
Look at the definition of curl as given in cartesian coordinates:

http://mathworld.wolfram.com/Curl.html

for a force to be conservative, the vector needs to be 0... ie the coefficient of [tex]\hat{x}[/tex], [tex]\hat{y}[/tex] and [tex]\hat{z}[/tex] are each equal to 0.

In your formula, there are only x's... so I presume the force is acting in the x-direction... and depends only on the x-value... in that case the force is conservative already... no matter what coefficients you give...

I think you need to incorporate y, z etc...
 

Similar threads

Replies
13
Views
2K
Replies
25
Views
1K
  • · Replies 27 ·
Replies
27
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 7 ·
Replies
7
Views
1K
Replies
15
Views
3K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
4
Views
969
Replies
6
Views
3K