Want help regarding my classical mechanics assignment

  • Thread starter Dr.Brain
  • Start date
  • #1
538
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.
 

Answers and Replies

  • #2
learningphysics
Homework Helper
4,099
5
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...
 

Related Threads on Want help regarding my classical mechanics assignment

Replies
5
Views
2K
  • Last Post
Replies
1
Views
4K
  • Last Post
Replies
1
Views
2K
Replies
12
Views
2K
Replies
1
Views
1K
Replies
3
Views
1K
  • Last Post
Replies
6
Views
8K
Replies
9
Views
2K
Replies
4
Views
7K
Replies
2
Views
6K
Top