# Search results

1. ### Find the electric field of a uniformly polarized sphere

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 ! :)
2. ### Find the electric field of a uniformly polarized sphere

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
3. ### Find the electric field of a uniformly polarized sphere

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

5. ### Comp Sci Error while calculating arc length of curve in Fortran

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
6. ### Comp Sci Error while calculating arc length of curve in Fortran

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.
7. ### Comp Sci Error while calculating arc length of curve in Fortran

Well if for x1=0.5 and for x2=1.5 I am getting 104.3853... That can't be right since I've checked it in wolframalpha and it says 13
8. ### Comp Sci Error while calculating arc length of curve in Fortran

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...
9. ### Comp Sci Help with fortran

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
10. ### Comp Sci Help with fortran

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...
11. ### Comp Sci How to break a number into separate digits in Fortran

Here is line 34 harmonicmean=(5)/((1/div11)+(1/div22)+(1/div33)+(1/div44)+(1/div55))
12. ### Comp Sci How to break a number into separate digits in Fortran

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...
13. ### Comp Sci How to break a number into separate digits in Fortran

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...
14. ### Comp Sci Fortran 95 code won't run

Thank you very much both SteamKing and Mark44 I really appreciate your help!!,and excuse me for not adding tags around my code
15. ### Comp Sci Fortran 95 code won't run

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