Group Abstract Group Abstract

Message Boards Message Boards

0
|
4.7K Views
|
10 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Get the equation solutions in terms of specific variable?

Posted 6 years ago

How could I get the results in terms of x and y not epsilons. here is the code and the file is attached too.

Thanks in advance

u = 2 x^2; v = 2 y^2; w = 
 2 x^2; \[Nu] = .3; \[Lambda] = (\[Nu] EE)/((1 + \[Nu]) (1 - 2 \[Nu]));
Solve[\[Epsilon]x == D[u, {x, 1}], \[Epsilon]x]
Solve[\[Epsilon]y == D[v, {y, 1}], \[Epsilon]y]
Solve[\[Gamma]xy == D[u, {y, 1}] + D[v, {x, 1}], \[Gamma]xy]
Solve[\[Sigma]x == 
  2 G \[Epsilon]x + \[Lambda] (\[Epsilon]x + \[Epsilon]y), \[Sigma]x]
Solve[\[Sigma]y == 
  2 G \[Epsilon]y + \[Lambda] (\[Epsilon]x + \[Epsilon]y), \[Sigma]y]
Solve[\[Tau]xy == G \[Gamma]xy, \[Tau]xy]
Attachments:
POSTED BY: Kamal Hayder
10 Replies

You can try Eliminate:

Eliminate[{\[Tau]xy == 
   D[-3/2 p x^2 y^2 + c1 y^2 + 1/2 p x^4 + c3, x],
  \[Sigma]y == D[p  x y^3 - 2 p x^3 y, y]},
 {x, y}]
POSTED BY: Gianluca Gorni

You can solve two equations together:

u = 2 x^2;
sls = Solve[{\[Epsilon]x == D[u, {x, 1}], \[Epsilon]y == 
    D[v, {y, 1}]}, {\[Epsilon]x, \[Epsilon]y}]
Solve[\[Sigma]x == 
   2 G \[Epsilon]x + \[Lambda] (\[Epsilon]x + \[Epsilon]y), \
\[Sigma]x] /. sls
Solve[\[Gamma]xy == D[u, {y, 1}] + D[v, {x, 1}], \[Gamma]xy] /. sls
Solve[\[Sigma]y == 
   2 G \[Epsilon]y + \[Lambda] (\[Epsilon]x + \[Epsilon]y), \
\[Sigma]y] /. sls
Solve[\[Tau]xy == G \[Gamma]xy, \[Tau]xy] /. sls
POSTED BY: Gianluca Gorni

You can use the fact that Solve gives the result as replacement rules. Replace \[Epsilon]x with the value given by Solve:

u = 2 x^2;
Solve[\[Sigma]x == 
  2 G \[Epsilon]x + \[Lambda] (\[Epsilon]x + \[Epsilon]y), \[Sigma]x]
% /. Solve[\[Epsilon]x == D[u, {x, 1}], \[Epsilon]x]
POSTED BY: Gianluca Gorni
Posted 6 years ago

Hi Kamal,

Is this what you mean?

Solve[?x == D[u, {x, 1}], x]
(* {{x -> ?x/4}} *)
POSTED BY: Rohit Namjoshi
Posted 6 years ago

It works. So grateful for your quick response.

Thank you

POSTED BY: Kamal Hayder
Posted 6 years ago

Dear Gianluca Gorni, Many thanks for your help. Now, I'm trying to apply the same manner that you explained above but in different problem. I don't get expected answer from Mathematica.

Here is the code:

In[1]:= Quit[]

In[1]:= ClearAll;

EE = Solve[[Sigma]y == D[p x y^3 - 2 p x^3 y, y], [Sigma]y]

In[3]:= Solve[[Tau]xy == D[-1.5 p x^2 y^2 + c1 y^2 + .5 p x^4 + c3, x], [Tau]xy]

In[2]:= Solve[[Tau]xy == D[-1.5 p x^2 y^2 + c1 y^2 + .5 p x^4 + c3, x], [Tau]xy] /. EE

Out[2]= {{[Tau]xy -> 2. p x^3 - 3. p x y^2}} /. EE

As you see in the Out[2], I want the answer to be in terms of [segma]y.

Can you please tell me the right code in this case? I attached the file too.

Thank you

Attachments:
POSTED BY: Kamal Hayder
Posted 6 years ago

Dear Gianluca Gorni, Thanks a lot.

POSTED BY: Kamal Hayder
Posted 6 years ago

Gianluca Gorni,

How can I apply (ReplaceAll) for replacing more than one function like replacing both [Epsilon]x and Epsilon y altogether in one simple command? should i repeat [/.] for each function or use brackets?

Thank you

Solve[[Sigma]x == 2 G [Epsilon]x + [Lambda] ([Epsilon]x + [Epsilon]y), \ [Sigma]x] /. Solve[[Epsilon]x == D[u, {x, 1}], [Epsilon]x] Solve[[Epsilon]y == D[v, {y, 1}], [Epsilon]y] Solve[[Gamma]xy == D[u, {y, 1}] + D[v, {x, 1}], [Gamma]xy] Solve[[Sigma]y == 2 G [Epsilon]y + [Lambda] ([Epsilon]x + [Epsilon]y), [Sigma]y] Solve[[Tau]xy == G [Gamma]xy, [Tau]xy]

Attachments:
POSTED BY: Kamal Hayder
Posted 6 years ago

Gianluca Gorni, This is what i was looking for. Thank you very much

POSTED BY: Kamal Hayder
Posted 6 years ago

Hi Rohit Namjoshi,

Thanks for your reply. I have segma is function of epsilon, epsilon is function of neu and neu is function of x. i want to find segma in terms of x.

When I SOLVE epsilon i get it in terms of x (which is OK). Then i SOLVE Segma and get it in terms of epsilon ( i want it in terms of x)

is there a simple way to do so?

u = 2 x^2; Solve[[Epsilon]x == D[u, {x, 1}], [Epsilon]x] Solve[[Sigma]x == 2 G [Epsilon]x + [Lambda] ([Epsilon]x + [Epsilon]y), [Sigma]x]

i also attached the file

Many thanks for your help

Attachments:
POSTED BY: Kamal Hayder
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard