# Calculate lesser value subject to conditions

which is the lowest value of c: if

$a^2 + b^2 = c^2$ , and , $ab + ac + bc = 100$

As I solve this problem with mathematica edit

these conditions are generated from a right triangle with hicks a and b , and hypotenuse c is not a task , personal research

Replay

eqns = {a^2 + b^2 == c^2, a*b + a*c + b*c == 100, a > 0, b > 0, c > 0};

sol = Minimize[{c, eqns}, {a, b, c}] // ToRadicals // FullSimplify

(*  {10 Sqrt[2/7 (-1 + 2 Sqrt)], {a -> 10 Sqrt[1/7 (-1 + 2 Sqrt)],
b -> 10 Sqrt[1/7 (-1 + 2 Sqrt)], c -> 10 Sqrt[2/7 (-1 + 2 Sqrt)]}}  *)



The approximate numerical values are

sol // N

(*  {7.22778, {a -> 5.11081, b -> 5.11081, c -> 7.22778}}  *)



Verifying that the solution satisfies the equations and constraints

eqns /. sol[[-1]]

(*  {True, True, True, True, True}  *)



EDIT: Since a and b are interchangeable this can be simplified to

eqns2 = {2 a^2 == c^2, a^2 + 2*a*c == 100, a > 0, c > 0};

sol2 = Minimize[{c, eqns2}, {a, c}] // ToRadicals // FullSimplify

(*  {10 Sqrt[2/7 (-1 + 2 Sqrt)], {a -> 10 Sqrt[1/7 (-1 + 2 Sqrt)],
c -> 10 Sqrt[2/7 (-1 + 2 Sqrt)]}}  *)

sol[] === sol2[]

(*  True  *)


Category: equation solving Time: 2016-07-28 Views: 0

## Related post

• For loop and conditional statement to calculate a value 2016-02-07

Trying to Calculate a value for the Interest variable using the conditions i set below, but having trouble as it is returning 0, or if i rearrange the for loop it returns 6471 for each account. Would be great if you can help me fix the for loop so th

• Excel do dynamic "merge & Center" based on values or through "Conditional Formating" 2011-05-10

is it possible to dynamically apply "merge & Center" based on values or through "Conditional Formatting"? I made it possible to add colors but I want to do more advanced thing with Excel do dynamic "merge & Center" so

• How to calculate appropriate value for noise-removal capacitor? 2016-03-05

I'm still figuring out analog electronics with my waveform generator project. It has a 9V power supply that I split into +/-4.5V rails with an op amp virtual ground (the subject of an earlier question). The +4.5V side powers an ATmega328P that genera

• How much more or less value is placed in tailored meta tags? 2011-10-04

I just built and released a site for someone. He has an SEO firm working for him. They made a really big stink about the meta tags not being completely customizable on a page by page basis. Yes, the meta tags are tailored to each page, but the tags a

• How to calculate y value from ((y*y) mod prime) efficiently 2013-03-21

i am working ECC-224 bit. can any one tell me, how to calculate y value from ((y*y) mod prime) efficiently for large bit numbers. --------------Solutions------------- square roots in prime order groups are simple to calculate, if you know the group o

• Need to Change the Field Label and its value Based on Condition in a Visual Force page in PDF Format 2015-02-04

Can any one help me on this .I have created a custom visual force page on "Opportunity "object .I have conditions where i need to change the field label name and its value Based on Condition in a Visual Force page in PDF Format.Can we do this .A

• How to calculate a value based on another field under arcpy.da.UpdateCursor and cursor.updateRow? 2015-03-10

I am trying to do a calculations under arcpy.da.UpdateCursor. I want to calculate the values for the records that have FIPS=06037. I want to take the values from "kg" column and populate the new value by multiply by 3 in "kg_new" colum

• How calculate sequential values based on group field? 2015-12-22

In field calculator i calculate sequential values in field [ORDER_ID] What need change in script to calculate sequential values based on group field [GROUP_ID]. I select values manually and use autoincrement () in Field Calculator. Parser: Python Exp

• Calculate sound value with distance 2016-01-16

I have a more mathematical than programming question, sorry if I'm not in the right section. In my 2D game, we can move the camera on a map where there are objects that can emit sound, and this sound volume (defined by a float from 0 to 1) must incre

• calculate array values input from first row and first column 2016-01-20

I would like to calculate matrix values using a separate function and taking the first column and first row as input. I would like to receive advice on optimising the code below: #imports import numpy as np import pandas as pd #numpy variant #creatio

• How to calculate the value for each process in VHDL? 2016-01-27

I have the following VHDL code: proc1: process (x,y,z) is -- Process 1 variable var_s1, var_s2 : std_logic; begin L1: var_s1 := x and y; L2: var_s2 := var_s1 xor z; L3: res := var_s1 or var_s2; end process; proc2: process (x,y,z) is -- Process 2 begi

• Calculating percentages per subject per condition 2016-02-04

I would like to create two columns in my saccades (eye-movements) dataset: one column with the percentage of incorrect and one column with the percentage of correct responses per subject per condition. I do not know how to create the loop for it ...

• What is the best method or algorithm to produce a less value of Mean Square Error(MSE)? 2016-02-17

If I have two vectors A = {8, 6, 5, 7} B = {1, 3, 2, 4} What is the best method or algorithm to subtract each element in A from anthor element in B (without repeating the elements) to produce a less value of Mean Square Error(MSE) ?

• How to Calculate NDWI Value in Arcgis 10.1? 2016-06-16

I want to delineate surface water feature of my Landsat raster image and also want to calculate the area of water body. I have learned through internet that NDWI can be used to delineate open water feature. My question is how can I calculate NDWI val

• Calculate mean value for each raster and convert output array to data frame 2016-06-29

How do I calculate mean value for each raster and convert output array to data frame? r <- as.data.frame(cellStats(x,mean)) I appreciate your help. --------------Solutions------------- to loop through a list of raster file paths: library(raster) #loa

• how to calculate the value of current limiting resistor connected to zener on full load conditions? 2015-11-02

I know the formula R=vs-vz/Iz but is it applicable with no load condition? and would it be R=vs-Vz/IL when load is attached? --------------Solutions------------- If the load isn't attached then the resistor can be massively bigger and, in these circu

• Calculate minimum subject to conditions 2016-07-28

What is the lowest value of $c$ such that $\qquad a^2 + b^2 = c^2$ and $\qquad ab + ac + bc = 100$ I want to solve this problem with Mathematica Edit These conditions are generated from a right triangle with sides $a$ and $b$ and hypotenuse $c$. This

• Calculate RGB value for a range of values to create heat map 2013-12-26

I am trying to create a heat map with python. For this I have to assign an RGB value to every value in the range of possible values. I thought of changing the color from blue (minimal value) over green to red (maximal value). The picture example belo

• Shapefile with overlapping polygons: calculate average values 2014-01-06

I have a very big polygon shapefile with hundreds of features, often overlapping each other. Each of these features has a value stored in the attribute table. I simply need to calculate the average values in the areas where they overlap. I can imagin