Dr.Peterson
Elite Member
- Joined
- Nov 12, 2017
- Messages
- 16,749
eventually i'm going to try and do it in a program, but i can't even get it to work by hand right now.
i see i'm mistaken and it's actually 0.7071067811865476. i must misunderstand the equation because i'm supposed to be getting 2.
i thought there would be a simpler solution for this since it's a code challenge. like running the square root of numbers on top of the other equations in a JS function seems really cumbersome.
Can you please state the specific problem you are trying to solve? You've been really making it hard for everyone who is working with you, by giving little bits of information and keeping it cryptic.
When you say it's a "code challenge", do you mean it is a task you were given that you can quote exactly? And why would its being a challenge imply that it would be easy? On the other hand, I don't see what you are saying would be hard in JS, so I'll want to see the code you're writing in order to see if you are doing that part wrong.
Let's say you want to solve the problem that was suggested (using your current numbers 8, 4, 2, which you never defined):
You are given 8 grams of a radioactive substance. After 4 hours, you remeasure and find that the radioactive portion is now only 2 grams. Find the half-life of the substance.
You are using the formula as used in the first part of the video, y = ab^t, so you have to solve 8b^4 = 2.
No, that doesn't fit your equation; you must have meant this:
You are given 8 grams of a radioactive substance. After 2 hours, you remeasure and find that the radioactive portion is now only 4 grams. Find the half-life of the substance.
(Can you see how hard you are making this for us?)
You are solving 8b^2 = 4, and you get b = (1/2)^(1/2) = sqrt(1/2).
Now, you realize from the video that you are not finished, right? This is the base, not the half-life. (There are other methods that could get you to the answer more quickly, but I'll stick with the one you found.)
Can you continue doing what the video shows, until you find the half-life? You're right that it will be 2.
Once you get to a solution, we can talk about better ways to do it. But before I do that, I'll want to see the actual assignment, so I can be sure I'm suggesting the best way to do what you actually have to do.