Message Boards Message Boards

0
|
6945 Views
|
6 Replies
|
5 Total Likes
View groups...
Share
Share this post:

[?] Solve a system of two rather complicated power equations?

Hi

I am not a Mathematica user, I am just looking for a math package that can solve my problem.

I need to solve a system of two rather complicated power equations, like those in the image below. Here x and z are the unknown variables, all other constants are known. Can Mathematica do that?

But actually I need even more. I will have a set of values for the known constants I and D (A and a are fixed). So I will need not just one solution but a set of solutions for each pair of (I, D). So, if I feed the set of (I,D) pairs into Mathematica, can it produce a set of solutions for me, not just one solution?

enter image description here

POSTED BY: Lev Dorosinskiy
6 Replies

Thanks a lot! This was very helpful. Now I see that I can get the solution I need with Mathematica

POSTED BY: Lev Dorosinskiy

I would recommend not using the letter D for a symbol in your equation. D is a built in symbol, which is why it shows up as black in a notebook without you having defined it.

It doesn't give an error in Gianluca's code (because it has DownValues but no OwnValues), but it is still a good practice to avoid name conflicts.

POSTED BY: Jason Biggs

Yes, it's easy once you clarify your input and output format. You can repackage the solution into a function, for example

sol[{i_, d_}] = 
 Solve[{i == A z (z^2 + (a + x)^2)^(-1/2), 
   d == A (x + a) (z^2 + (a + x)^2)^(-3/2)}, {x, z}]
sol[{1, 2}]
POSTED BY: Gianluca Gorni

Gianluca's solution outputs enter image description here Then of course you can use your (I,d) and the a, A constants to fill in the gaps. So I would say it's easy to implement this with Mathematica.

POSTED BY: l van Veen

Thank you for the reply. Looks quite simple. But is it possible to automatically produce a set of solutions for a set of (I, D) pairs? This set is going to be quite long (several hundred pairs) so it does not look practical to run the above solution for each pair separately.

POSTED BY: Lev Dorosinskiy

For this particular set of equation it can:

Solve[{i == A z (z^2 + (a + x)^2)^(-1/2),
  D == A (x + a) (z^2 + (a + x)^2)^(-3/2)},
 {x, z}]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract