About the
\cos\theta' I have found from another post the following explanation:It states that it is used because we care about the Z components only ,but I don't quite get it.Thanks a lot ! :)
Thank you for your time Sir.Although I would like to know if this can be solved with my method of integration and specifically I would really appreciate it If my first question was answered.My kind regards
Homework Statement
We want to calculate the field of a uniformly polarized sphere of radius=R
Homework Equations
V(\vec{r}) = \frac{1}{4 \pi\epsilon_{0}} \oint_{S} \frac{\sigma_{b}}{r} da' + \int_{V} \frac{\rho_{b}}{r} d\tau'
The Attempt at a Solution
i)I know that
\sigma_{b} = P...
I am aware of that,although that can't be the problem the bigger the n the more my sum goes up.And the problem states that it should be able to work with just n=20,which doesn't in my case.Therefore I assume the problem is associated with my code.Nevermind thanks for your suggestion
Well I think the curve's x's from x1 to x2 can be divided to 20 equidistant x's with every n to be used to get to the next x.Xn=abs(x2-x1)*x/20 and X(n-1)=(x-1)*(abs(x2-x1)/20).Therefore if I subtract Xn,X(n-1),I will be getting the distance between consecutive X's.
The program must calculate the length of the curve of ƒ=3.1*x^2-5.3/x between x=1/2 and x=3/2.The legth should be calculated as the sum of n line segments starting with n=1 and ending with n=20.
I really can't find why the result I'm getting is wrong.Thanks in advance
I am giving you the code...
Hello everyone ! Thank you very much for your help I really appreciate that! Could you please explain why my factorials are wrong? It's strange since I get correct answers only for some degrees e.x 45 and wrong for many others such as 90 degrees.Thanks in advance
Hello I was assigned the following problem:Make a Fortran program which will be able to read a degree[0-360] checking validity range(not type) and it will be able to calculate and print the cos(x) from the following equation:
cos(x)=1-x^2/2! + x^4/4!-x^6/6!+x^8/8!-...,where x is in radiants.As a...
Thank you all for your answers I really appreciate that.I have updated the code though the only error it seems have is that in line 34 it occurs a problem that says integer diveded by zero,although I contemplate there is no such division.Is anyone able to spot what's wrong?
!this program accepts...
Mod note: Fixed indents in code below
!this program accepts a 5 digit integer
!and calculates the harmonic and geometric means of it's digits
!the program checks and denies numbers with lenght diffrent than 5 digits
!The harmonic mean should be calculated only when
!all of the number's digits...
Homework Statement . [/B]Hello all !! I am currently trying to make my fortran95 code run in vain.I would really appreciate it if someone could lend my a hand since I am a starter in programming.So the problem goes like that:Create a program capable of calculating the following function...