If your iPad is new, you should return it to your retailer for warranty service or replacement.
If you purchased directly from Apple, you have 14-days within which to unconditionally return your device for exchange or refund. If within your 14-days eligibility, you would be best advised to make use of the opportunity while it is available to you - otherwise you will be reliant upon remedy under warranty. Depending upon your country/region, you may have additional statutory rights and remedies available to you.
In addition to the above, should you have opted to purchase the optional AppleCare+ cover prior to discovery of the problem, you may be able to make a claim.