From: Asttro on
I just started using Mathematica and have no idea how to do the following...

I have the starting equation:

y=((1+sqrt(5.71e8/x))*x)/6.38e9

What I want is to obtain x=a+b*y, where a and b are parameters.

Is this possible in Mathematica?

From: Sjoerd C. de Vries on
What you want is mathematically impossible. x and y are not linearly
related. Anyway, to bring you as close as possible to what you want
you could try to use the correct Mathematica syntax for your equation:

y == ((1 + Sqrt[5.71 10^8/x])*x)/6.3810^9

double = to make it a real equation, otherwise it's a Set operation.
Square brackets for functions and a capital letter for any built-in
function. Powers of 10 written as powers of 10 and not of e. Then you
can use Solve to solve this equation for x:

Solve[y == ((1 + Sqrt[5.71 10^8/x])*x)/6.3810^9, x]

{{x ->
2.27747*10^-28 (1.25358*10^36 + 7.70097*10^34 y -
4.39404*10^35 Sqrt[8.13912 + 1. y])}, {x ->
2.27747*10^-28 (1.25358*10^36 + 7.70097*10^34 y +
4.39404*10^35 Sqrt[8.13912 + 1. y])}}

So, two solutions none of which have the shape you'd like. But as said
above that can't be done, not in Mathematica not in anything else.

Cheers -- Sjoerd



On Apr 14, 4:40 am, Asttro <imor...(a)gmail.com> wrote:
> I just started using Mathematica and have no idea how to do the following=
....
>
> I have the starting equation:
>
> y=((1+sqrt(5.71e8/x))*x)/6.38e9
>
> What I want is to obtain x=a+b*y, where a and b are parameters.
>
> Is this possible in Mathematica?


From: DC on
If I understand your equation correctly then x is not a linear function
of y :

In[2]:= Solve[y == (1 + Sqrt[a/x]) x/b, x]

Out[2]= {{x -> 1/2 (a + 2 b y - Sqrt[a] Sqrt[a + 4 b y])}, {x ->
1/2 (a + 2 b y + Sqrt[a] Sqrt[a + 4 b y])}}

-Francesco

On 04/14/2010 03:40 AM, Asttro wrote:
> I just started using Mathematica and have no idea how to do the following...
>
> I have the starting equation:
>
> y=((1+sqrt(5.71e8/x))*x)/6.38e9
>
> What I want is to obtain x=a+b*y, where a and b are parameters.
>
> Is this possible in Mathematica?
>

From: David Park on
You are really going to have to spend some time learning the basics and
syntax of Mathematica. It's not Fortran, and equations are not entered in
anything like the form you have. Without doing some preliminary study from
the Documentation Center you will waste A LOT of time.

But, this is probably a good example to cut your teeth on so here is one
solution.

First, try to solve equations exactly with parameters before you put dirty,
messy, approximate data values into them. Mathematica is good at exact
solutions and it should always be the first choice. So we define the
equation. (You can copy these statements, paste them into your notebook,
and evaluate them to see the results.) You should look up many of these
names and symbols in Help.

eqn = y == (1 + Sqrt[c/x] x)/d

Notice that eqn is a symbol that contains the actual equation (Set with =)
and the equation itself has == for Equal, which is different than Set.
Notice that I have used c and d to represent the numbers in the equation. We
can save, and later use, their values in the variable data as follows.

data = {c -> 5.71*^-8, d -> 6.38*^9}

These are substitution rules. Look up Rule and ReplaceAll in Help.

Now we solve the equation and, at the end, substitute the data values. Here
I do this all in one cell and give a step by step annotation with Print
statements. (Again, copy, paste and evaluate.)

Print["Solution of the equation for x"]
step1 = Solve[eqn, x]
Print["There is only one solution rule. Pick it out."]
step2 = Part[step1, 1, 1]
Print["Use the solution rule on x to obtain the value."]
step3 = x /. step2
Print["Write as a polynomial in y by using Apart."]
step4 = Apart[step3]
Print["Substitute the data values."]
step5 = step4 /. data // Expand

The net result is that it does not look like y can be well represented by a
+ b y unless y is much less than 10^-10


David Park
djmpark(a)comcast.net
http://home.comcast.net/~djmpark/



From: Asttro [mailto:imoric1(a)gmail.com]

I just started using Mathematica and have no idea how to do the following...

I have the starting equation:

y=((1+sqrt(5.71e8/x))*x)/6.38e9

What I want is to obtain x=a+b*y, where a and b are parameters.

Is this possible in Mathematica?



From: Bill Rowe on
On 4/19/10 at 4:07 AM, imoric1(a)gmail.com (Asttro) wrote:

>I just started using Mathematica and have no idea how to do the
>following...

>I have the starting equation:

>y=((1+sqrt(5.71e8/x))*x)/6.38e9

>What I want is to obtain x=a+b*y, where a and b are parameters.

>Is this possible in Mathematica?

Yes. But first you will need to use the appropriate syntax. In
Mathematica, an equation has a double equal sign (==) not a
single equal sign. All built-in functions begin with an upper
case letter and function arguments are delimited with square
brackets. That is, your equation needs to be written as:

y == ((1 + Sqrt[5.71 10^8/x]) x)/6.38 10^9

or

y == ((1 + Sqrt[5.71*10^8/x])*x)/6.38*10^9

Then doing

Solve[y == ((1 + Sqrt[5.71 10^8/x]) x)/6.38 10^9, x]

will give you the desired solutions