crs12decoder Posted August 13, 2011 Report Posted August 13, 2011 Ana si Maria au mere intregi.Daca Maria ar avea de doua ori mai multe mere decat are acum si ar mai pune pe langa ele si merele Anei, ar avea in total 14 mere.Daca fetele si-ar aduce prietene cate mere are Ana, fiecare dintre ele avand tot atatea mere cate are Ana si le-ar pune intr-un cos impreuna cu merele Mariei , ar avea in cos 21 de mere.Cate mere are Ana, Cate mere are Maria? Quote
gigaevil Posted August 14, 2011 Report Posted August 14, 2011 (edited) Ana are 4 mere si Maria are 5 mere?Sau solutie 2Ana are 35/4 mere si Maria are -7/2 mereE un sistem de 2 ecuatii cu 2 necunoscute2*maria+x=14maria+x*x=21Cod sursa MATLABsyms xsyms mama[solutions_maria,solutions_x] = solve('2*maria+x=14','maria+x*x=21')solutions_maria = 5 35/4solutions_x = 4 -7/2Offtopic: Thanks to MATLAB Edited August 14, 2011 by gigaevil Quote
MrGod Posted August 14, 2011 Report Posted August 14, 2011 Ana si Maria au mere intregi.Daca Maria ar avea de doua ori mai multe mere decat are acum si ar mai pune pe langa ele si merele Anei, ar avea in total 14 mere.Daca fetele si-ar aduce prietene cate mere are Ana, fiecare dintre ele avand tot atatea mere cate are Ana si le-ar pune intr-un cos impreuna cu merele Mariei , ar avea in cos 21 de mere.Cate mere are Ana, Cate mere are Maria?2M + A = 14P x P + M = 21 <=> P^2 + M = 21A = PM - MariaA - AnaP - prieteneMaria are 5 mereAna are 4 mere2 x 5 + 4 = 144^2 + 5 = 21 Quote
sulea Posted August 14, 2011 Report Posted August 14, 2011 ana=amaria=b2b+a=14 => b=(14-a)/2a*a+b=21 => a*a+(14-a)/2=21 => (dupa amplificare) 2*a*a+14-a=42 => 2*a*a-a=28merele fiind nr intregi >=0 => din prima ecuatie ca a<=14 (in cazul in care maria ar avea minimul de 0 mere). deci a e cuprins intre 0 si 14daca ar fi 0=> 2*0*0-0 != 28daca ar fi 1=> 2*1*1-1 != 28daca ar fi 2=> 2*2*2-2 != 28daca ar fi 3=> 2*3*3-3 != 28daca ar fi 4=> 2*4*4-4 = 28deci a = 4, deci ana are 4 mere2b+a=14=> 2b=10 => b=5 deci maria are 5 mere Quote
crs12decoder Posted August 14, 2011 Author Report Posted August 14, 2011 Da, e corect.@gigaevil: Ana are 35/4 mere si Maria are -7/2 mereInitial am zis: Ana si Maria au mere intregi.deci e corect 4 si 5. Quote
gigaevil Posted August 14, 2011 Report Posted August 14, 2011 Bine MATLAB-ul poate scoate si solutii complexe, eu doar le-am copiat. Quote