# Calculating Demand curve function from Elasticity of demand, price per quantity and quantity purchased?

For an assignment I have to model the demand function and find consumer surplus based upon elasticity of demand, price per quantity and quantity purchased. Ill copy and paste the assignment below and then show what I did, but im not quite sure if its correct.

1. Given the following information, find the linear demand-curve functions for each product. Given the information, what is consumer surplus for each product?

A. Apples: price elasticity of demand is -0.58; price per pound is $1.00; quantity purchased 9.8 million pounds. B. Donuts: price elasticity of demand is -1.70;$2.80 per pound; quantity purchased is 1.3 billion pounds.

Here are my solutions, ill explain them below

for Part A, because the price per quantity is 1:1, i said that the price elasticity of demand is equal to the slope of the line. Is this a correct assumption? from there I wrote the equation in point slope form, did some algebra to make it slope intercept form, which gave the the y intercept so I can calculate the consumer surplus.

For part B, since the relationship is not 1:1, and price elasticity of demand is in terms of percentage, I divided the elasticity of demand by the price per unit, effectively showing the relationship between P and Q as if one unit was \$1, and then I got my slope. Is this correct? can I do this? From there I followed the same method to find the equation of the line and therefore calculate consumer surplus.

So am I doing this correctly? If not how do I go about starting this? Thank you!